Access in-meeting user information
The code on this page works with either the default UI or the custom UI.
After joining a meeting, access information for each meeting participant through InMeetingService and InMeetingServiceListener.
Use one of several different IDs, each serving its own purpose, to access user information.
- Customer key - A developer-supplied identifier that may be passed in through the
MeetingOptionsinstance used to join a meeting. - User ID - A nonpersistent, unique per-user identifier assigned by Zoom for the current meeting. If a user leaves and rejoins the same meeting, they get a new user ID assigned each time they join. This is also reassigned when switching between the main meeting and breakout rooms.
- Persistent ID - A per-user identifier assigned by Zoom for the current meeting and all submeetings, such as breakout rooms. This per-user identifier will not be reassigned in the same meeting or submeeting, but users in different meetings may have the same ID value.
- Participant ID - A unique per-user identifier assigned by Zoom to a user's account. This persists across all meetings for an account. You can't access this ID through the Android SDK, but can retrieve it through the REST API.
When a user joins a meeting, get their InMeetingUserInfo object.
val inMeetingService = ZoomSDK.getInstance().inMeetingService
val listener = object : InMeetingServiceListener {
...
override fun onMeetingUserJoin(userList: MutableList<Long>?) {
userList?.forEach { userId ->
val user = inMeetingService.getUserInfoById(userId)
}
}
...
}
meetingService.addListener(listener)
InMeetingService inMeetingService = ZoomSDK.getInstance().getInMeetingService();
InMeetingServiceListener listener = new InMeetingServiceListener() {
...
@Override
public void onMeetingUserJoin(@Nullable List<Long> userList) {
for (long userId : userList) {
InMeetingUserInfo user = inMeetingService.getUserInfoById(userId);
}
}
...
};
meetingService.addListener(listener);
Access a specific user's data
Use the InMeetingUserInfo to access data specific to that user.
Get the customer key.
user.customerKey
user.getCustomerKey();
Get the user's avatar picture path, if available.
user.avatarPath
user.getAvatarPath();
Get the user ID.
user.userId
user.getUserId();
Get the username.
user.userName
user.getUserName();
Get the persistent ID.
user.persistentId
user.getPersistentId();
Each user in a meeting or webinar has a role assigned to one of these values.
InMeetingUserInfo.InMeetingUserRole.USERROLE_NONE- No role has been assigned.InMeetingUserInfo.InMeetingUserRole.USERROLE_HOST- The host of the current meeting or webinar.InMeetingUserInfo.InMeetingUserRole.USERROLE_COHOST- A co-host of the current meeting or webinar.InMeetingUserInfo.InMeetingUserRole.USERROLE_PANELIST- A panelist in the current meeting or webinar.InMeetingUserInfo.InMeetingUserRole.USERROLE_BREAKOUTROOM_MODERATOR- The breakout room moderator.InMeetingUserInfo.InMeetingUserRole.USERROLE_ATTENDEE- An attendee of the current meeting or webinar.
Get the user's role in the current meeting.
user.inMeetingUserRole
user.getInMeetingUserRole();
Determine whether a given user is the current user.
user.isMySelf
user.isMySelf();