Learn how to create, update, manage, and add users to your contact list.
QBRosterListener
.
Event | Description |
---|---|
entriesDeleted() | A contact list item is removed from the contact list. |
entriesAdded() | A new contact list item is added to the contact list. |
entriesUpdated() | A contact list item is updated. For example, a user’s name can be updated. |
presenceChanged() | A user presence is changed. Care should be taken when using the presence data delivered as part of this event. Specifically, when a user account is online with multiple devices, the UI should account for that. For example, say a user is online with their desktop computer and mobile phone. If the user logs out of the instant messaging client on their mobile phone, the user should not be shown in the contact list as offline since they’re still available on another device. |
chatService.getRoster()
only after successful connecting to Chat. To learn how to it, review this section.QBRosterListener
is a listener that is fired any time a contact list is changed or the presence of a user in the contact list is changed (for example, user becomes online/offline).QBSubscriptionListener
is a listener that is called subscriptionRequested
when the current user has been requested for adding to the Contact List from any user.QBRosterEntry
describes a user entity in your contact list. To get the Presence of a user, use getPresence(userID)
method. Then, you can get a user’s status.
subscriptionRequested
in QBSubscriptionListener
. This is a request to be added to the contact list.
contactsRoster.confirmSubscription()
method.
contactsRoster.reject()
method.
RosterListener
listener will give you all updates regarding contact list changes and users’ status updates.