Chat / Android
Chat Android v4
Chat Android
Chat
Android
Home
/
Chat
/
Android
/
User
This is the new Docs for Chat SDK v4 for Android. To see the previous Docs, click here.

Retrieve the latest information on participants

To retrieve the latest and updated information on each online participant in an open channel, you need to create a new query instance using the createParticipantListQuery() method, then call the next() method consecutively to retrieve the latest information.

You can also retrieve the latest information on participants at the application level. Similar to retrieving a list of users, you need to create a new query instance using SendbirdChat.createApplicationUserListQuery(), then call next() until you retrieve the latest.

You can get the participant's current connection status by checking user.connectionStatus in the returned list. Acceptable values of the user.connectionStatus property are OFFLINE and ONLINE.

Connection status values

ValueDescription

User.ConnectionStatus.OFFLINE

The user isn't connected to the Sendbird server.

User.ConnectionStatus.ONLINE

The user is connected to the Sendbird server.

Note: If you need to keep track of a participant's connection status in real time, we recommend that you call periodically the next() method of an ApplicationUserListQuery instance in intervals of one minute or more after specifying the value of userIdsFilter.