User Presence
Learn how to track user presence updates and check user status using ping.
Before you begin
- Register a QuickBlox account. This is a matter of a few minutes and you will be able to use this account to build your apps.
- Configure QuickBlox SDK for your app. Check out Setup page for more details.
- Create a user session to be able to use QuickBlox functionality. See Authentication page to learn how to do it.
- Connect to the Chat server. See Connection page to learn how to do it.
Visit Key Concepts page to learn the most important QuickBlox concepts.
Subscribe to contact presence updates
You can listen to the contact presence updates in real-time using the QBRosterListener
. However, you can listen to the presence of only those users who have been added to the contact list. See this section to learn how to implement the Contact List.
Ping user
QuickBlox SDK can send application-level pings to a user. As a result, you can check if the user is connected to the Chat server.
Argument | Required | Description |
---|---|---|
userID | yes | ID of the user. |
Ping server
QuickBlox SDK can send application-level pings to a server. As a result, you can check if there is a connection with the Chat server.
Add ping listener
Your pings can be unsuccessful. To handle unsuccessful pings, use the PingFailedListener
. It enables your app to listen to failed ping attempts.