Retrieve All Chat Groups

To fetch all the groups in which you are member of call the below method.

GroupManager.getAllGroups(GET_SERVER_DATA, (isSuccess, throwable, data) ->
if(isSuccess){
ArrayList<ProfileDetails> groupsProfileList = (ArrayList<ProfileDetails>) data.get("data")
// Update the UI
}else{
// Fetching group list failed print throwable to find the exception details.
}
});
caution

Need to call getAllGroups atlas once after user login so that the all the groups info will be fetched and saved in local DB else no group related data will be available.

ArgumentTypeDescription
GET_SERVER_DATAbooleanif true fetches data from the server else fetches data from local database
CALLBACKFlyCallbackFlyCallback implemented as lambda expression