Event Listener
The Javascript SDK provides interfaces to listen to various events on the client app. Through these interfaces, TapTalk.io notifies the client app of events that happen on your app.
TapTalk.io provides event listeners to notify events to the client app. You will need to register the listener objects to receive event callbacks from TapTalk.io.
Event Listener | Description |
Listens to general event changes in the application | |
Listens to events when a new/updated message is received by the application | |
Listens to changes to chat room's state in the room list | |
Listens to room status events such as typing events and online status | |
Listens to contact related events such as block or unblock contact |
TapListener
General events such as notifications will be notified through TapListener. A TapListener instance is required when initializing TapTalk.
TapListener listens to changes in the following methods:
Method Name | Invoked When |
| User's refresh token has expired. An authentication with a new auth ticket is required. |
TapCoreMessageListener
TapCoreMessageListener listens to message-related events, such as receiving new or updated message. TapCoreMessageListener can be registered through the TapCoreMessageManager class.
Method Name | Invoked When |
| A new message is received. Returns the newly received message. |
| An updated message is received. Returns the updated message. |
TapCoreRoomListListener
Changes to a chat room's state, such as pin and mute events are notified through TapCoreRoomListListener. An instance of TapCoreRoomListListener can be registered from the TapCoreRoomListManager class.
Method Name | Invoked When |
---|---|
| The active user deleted a chat room. Returns the room ID of the deleted room. |
TapCoreChatRoomListener
Room status events such as typing events and online status are notified through TapCoreChatRoomListener. An instance of TapCoreChatRoomListener can be registered from the TapCoreChatRoomManager class.
Method Name | Invoked When |
| Another user starts typing a message in a chat room. Returns the room ID and typing user. |
| Another user stops typing a message in a chat room. Returns the room ID and typing user. |
| Another user comes online or offline. Returns the updated user, online status, and the updated user's last active time stamp. |
TapCoreContactListener
Contact related events such as block/unblock are notified through TapCoreContactListener. An instance of TapCoreContactListener can be registered from the TapCoreContactManager class.
Method Name | Invoked When |
| Active user blocks another user. Returns the blocked user. |
| Active user unblocks another user. Returns the unblocked user. |
Last updated