7.3 Get Unjoined Public Groups
The getUnjoinedPublicGroups
returns all the public groups of the company, current employee is not a member of.
Method parameters :
success : Success block to be executed after public groups are successfully retrieved.
failure : Failure block to be executed if public groups could not be retrieved, returns
BayunError
.
ArrayList<Group> unjoinedGroupsArray;
//Success Callback
Handler.Callback success = new Handler.Callback() {
@Override
public boolean handleMessage(Message message) {
Log.d(TAG, "Get unjoined public groups call successful.");
unjoinedGroupsArray = (ArrayList<Group>)message.getData().getSerializable("BayunUnjoinedGroupsArray");
for (Group group: unjoinedGroupsArray) {
Log.d(TAG, "id: " + group.groupId);
Log.d(TAG, "name: " + group.groupName);
Log.d(TAG, "type: " + group.groupType);
}
return false;
}
};
//Failure Callback
Handler.Callback failure = new Handler.Callback() {
@Override
public boolean handleMessage(Message message) {
String error = message.getData().getString("BayunError", "");
Log.d(TAG, "Error getting Groups.");
return false;
}
};
bayunCore.getUnjoinedPublicGroups(success, failure);
Last updated
Was this helpful?