Learn how to track user presence updates and check user status using ping.
onContactListListener
. However, you can track the presence updates of only those users who have been added to the contact list. See this section to learn how to implement the Contact list.
Argument | Required | Description |
---|---|---|
userId | yes | ID of the user. |
function() | yes | Specifies a callback function that accepts one argument that specifies what error has happened. |
Argument | Required | Description |
---|---|---|
userJid | yes | User JID. JID (Jabber ID) of the user in the in the XMPP server. Assigned automatically by the server upon the login to the Chat. The users will have different JIDs for different apps. The JID format is the following:<user_id>-<app_id>@chat.quickblox.com |
function() | yes | Specifies a callback function that accepts one argument that specifies what error has happened. |
Argument | Required | Description |
---|---|---|
server | no | Custom server address. You can ping a specific chat server. If no server is specified, the server address is taken from the config object. See the Point SDK to enterprise server section to learn how to set up custom server endpoints. |
function() | yes | Specifies a callback function that accepts one argument that specifies what error has happened. |
pingTimeout
. By default, the pingTimeout
is 30 seconds. If the response wasn’t received within the specified time frame, then the error callback is called.
Set the pingTimeout
in seconds, in the CONFIG
object. See Initialize SDK section to learn more about other configuration options.