Users can get a list of groups that they are the owner of.
The following sample code shows how to get a list of groups that the current user is the owner of.
// Get the currently logged-in user. KiiUser user = KiiUser.getCurrentUser(); try { // Get a list of groups owned by the current user. List<KiiGroup> ownerGroups = user.ownerOfGroups(); for (KiiGroup group : ownerGroups) { // Do something. } } catch (IOException e) { // Handle the error. } catch (AppException e) { // Handle the error. }
// Get the currently logged-in user. KiiUser user = KiiUser.getCurrentUser(); // Get a list of groups owned by the current user. user.ownerOfGroups(new KiiUserCallBack() { @Override public void onOwnerOfGroupsCompleted(int token, KiiUser user, List<KiiGroup> ownedGroups, Exception exception) { if (exception != null) { // Handle the error. return; } for (KiiGroup group : ownedGroups) { // Do something. } } });