Android
Updated at:
RTC SDK provides methods to allow you to manage channel members. You can obtain the list of remote online users, query remote user information, and query whether a user is online. This topic describes how to manage channel members.
Implementation methods
You can use the following methods to manage channel members. For more information, see AliRtcEngine interface.
getOnlineRemoteUsers: Obtains the list of remote online users.
public abstract String[] getOnlineRemoteUsers()Return result
Returns a list of user IDs.
Important This method has a delay when calling a channel. We recommend that you call this interface after calling the onRemoteUserOnLineNotify or maintain a remote user list yourself.getUserInfo: queries remote user information.
Parameter descriptionpublic abstract AliRtcRemoteUserInfo getUserInfo(String uid)Parameter Type Description uid String The ID of the user. Return result
Returns the remote user information AliRtcRemoteUserInfo.
isUserOnline: queries whether a user is online.
Parameter descriptionpublic abstract boolean isUserOnline(String uid)Parameter Type Description uid String The ID of the user. Return result
true indicates online. false indicates not online.
Is this page helpful?