ChannelPluginListener
Seamless chat UI and useful information you can use are embedded in the Channel Android SDK. When you need further customization, you may need to use ChannelPluginListener
.
ChannelIO.setListener(object : ChannelPluginListener {
// ...
})
onShowMessenger
Called when the messenger is shown. For example, a user clicks a launcher button or ChannelIO.showMessenger()
is called.
onHideMessenger
Called when the messenger is hidden. For example, a user clicks close button or ChannelIO.hideMessenger()
is called.
onChatCreated
Called when a chat room is created. For example, a user creates a chat room to ask something or ChannelIO.openChat()
with chatId=null
is called.
onBadgeChanged
Called when a badge count has changed. Badge is an unread alerts which is shown as a red dot on the top-right of the channel button.
onFollowUpChanged
Called when a user manually updates follow-up form. Namely:
- Settings(top-right button) > My contact information > Edit
- A follow-up form shown on the chat
onUrlClicked
Called when a user clicks a link or a link button. When a user clicks an URL, a default behavior is to move to the URL. The behavior can be overridden by returning true
.
If true
is returned, the SDK assumes that the listener is performing appropriate action and the SDK is not responsible for handling the URL.
onPopupDataReceived
Called when the in-app push is received. Namely:
- Manager replies to the message
- Receives a marketing message
onPushNotificationClicked
Called when a user clicks a system notification. The default behavior is to open the launcher activity of your application. To override this behavior you can return true
.
If true
is returned, the SDK assumes that the listener is performing appropriate action and the SDK is not responsible for handling the notification.
Updated 5 months ago