7.4 Join Public Group
T he joinPublicGroup
method is used to join any public group of the organisation.
Method parameters :
groupId : Group Id of the Public Group.
success : Success block to be executed after group is successfully joined.
failure : Failure block to be executed if group could not be joined, returns
BayunError
.
String groupId = "<groupId>";
//Success Callback
Handler.Callback success = new Handler.Callback() {
@Override
public boolean handleMessage(Message message) {
Log.d(TAG, "Group joined successfully.");
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 joining group.");
return false;
}
};
bayunCore.joinPublicGroup(groupId, success, failure);
Last updated
Was this helpful?