Learn how to track user presence updates and check user status using ping.
chatDidReceiveContactItemActivity(_ userID:isOnline:status:)
method of the QBChatDelegate
. 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. |
timeout | no | Ping timeout. To control how much time it takes to respond to a ping, you should set a ping timeout. If the response isn’t received within the specified time frame, then the error callback is called. Default: 30 seconds. |
timeInterval
and success
arguments is called.
Argument | Description |
---|---|
timeInterval | A double parameter. Indicates how long it took to ping in seconds. |
success | A boolean parameter. Indicates whether the ping was successful. If the sucess=1, the ping is successful (the user is connected to the Chat). If sucess=0, the ping isn’t successful. |
Argument | Required | Description |
---|---|---|
timeout | no | Ping timeout. To control how much time it takes to respond to a ping, you should set a ping timeout. If the response wasn’t received within the specified time frame, then the error callback is called. Default: 30 seconds. |
timeInterval
and success
arguments is called.
Argument | Description |
---|---|
timeInterval | A double parameter. Indicates how long it took to ping in seconds. |
success | A boolean parameter. Indicates whether the ping was successful. If the sucess=1, the ping was successful. If sucess=0, the ping wasn’t successful. |