Get User List in Flutter with MirrorFly Audio/Video SDK

Get User List#

To retrieve all registered users on MirrorFly SDK use below method. User list can also be retrived based on search key word, also this method supports pagination. This function will return the total number of pages.

warning

User presence and Profile instant update will not happen until a message is sent to that particular user.

Mirrorfly.getUserList(page: PAGE_NUMBER, search: SEARCH_TERM, perPageResultSize: PER_PAGE_RESULT_SIZE, flyCallback: (FlyResponse response){
if (response.isSuccess && response.hasData) {
var list = userListFromJson(response.data);
//User list fetched. Update the UI
} else {
//Get user list failed print throwable to find the details
}
});

Refer this doc to know more about Profile Details Class

ArgumentTypeDescription
PAGE_NUMBERintPage number of user list default value 1
PER_PAGE_RESULT_SIZEintNumber of users per page default value 20
SEARCH_TERMStringtext characters for which search has to happen default value empty
flyCallbackFlyResponsecallback to observe the action status

Get Registered Phonebook Contact Users#

Note : The registered contacts who are in your contacts will retrieved after the contact sync, those people's only observe your profile,user presence updates.

Once we started communicating , we can get the list of contact with chat data with whom we communicated so far.

Mirrorfly.getRegisteredUsers(fetchFromServer: FETCH_FROM_SERVER,flyCallback: (FlyResponse response){
if (response.isSuccess && response.hasData) {
var list = userListFromJson(response.data);
//Registered users fetched. Update the UI
} else {
//Fetching registered users failed print throwable to find the exception details
}
});

Refer this doc to know more about Profile Details Class

ArgumentTypeDescription
FETCH_FROM_SERVERbooltrue to fetch from server
flyCallbackFlyResponsecallback to observe the action status
caution

flyCallback which is used as a callback for most of the i/o operation is expressed.