Add all following callback methods while initializing the SDK. Callback listeners are functions that will be called whenever the specified event happens.
Note: Callback Listener name should be the same as described below.
Handles Connection Status, triggered whenever connection status changes.
Handles Presence Status of Friends, triggered whenever users online/offline status changes.
Handles User Profile Stanzas, used to get the profile detail of the user. Triggered when Get User Profile method called. Receives object values.
Handles Message Stanzas, triggered whenever new message related events are received in single/group chat.
For Single chat, message status will be updated only if all the participants sent the delivery/seen status.
An acknowledgement will be sent from the server whenever you sent a message stanzas to the server. For example, when you sent a delivery status to the message that you received, you will get an acknowledgment from the same.
Handles delivery status received from receipient user.
Handles seen status received from receipient user.
Received when message is delete (Delete For Me).
Received when message is delete (Delete For Everyone).
Received when clear/delete chat method is called.
Received when clear all/delete all chat method is called.
When user tries to log in with another device using same credentials, then the 1st user receives logout message. (In order to logout the user).
Note: This is applicable for Same resource (Web) only. User can log in simultaneously with Web and Mobile.
Handles Media Message upload progress, triggered when media message is sent. Receives an object values.
Also handles the cancel request. Whenever you would like to cancel upload of a media message, you can use
source.cancel() method to cancel the media content upload. Each cancel source is unique mapped to message id.
Handles Media Message download progress triggered when media message in download. Receives an Object values.
Handles User Block/Unblock Status, when user connected with 2 resource if one of the resource blocking/unblocking the user, other resource will be notified with this event.
Handles Group Profile Listener, triggered when group activities are requested/updated.
Whenever new participant is added to group, groupProfileListener callback will be triggered and the following response will be received.