ChannelPluginListener

The Channel Talk Android SDK offers a seamless chat UI along with useful information. In case 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 channel 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(int count) (Deprecated)

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.

onBadgeChanged(int unread, int alert)

Called when a badge count has changed. The badge is the number of notification from Channel Talk. See unread and alert field in User model for details.

onFollowUpChanged

Called when a user manually updates follow-up form. Namely:

  • Settings(bottom navigation) > Edit information (v11.0.0 or above)
  • Settings(top-right button) > My contact information > Edit (below v11.0.0)
  • 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.