ChannelPluginListener

A listener that provides events in ChannelIO

onChangeBadge

Notify when badge count (unread count for a guest) has been changed

parametertypedescription
countIntbadge count
void onChangeBadge(int count)

onChangeProfile

Notify when a guest profile has been changed. The parameter provides both profile key and its value. This method can be used when you want to sync updated guest data into your database.

parametertypedescription
keyStringa profile key
valueObjecta profile value
void onChangeProfile(String key, @Nullable Object value);

onClickChatLink

Notify when a link within a message is clicked. Return true if you want to handle an URL, otherwise false for default behavior. If this method is not implemented or return false, ChannelIO treats it as a normal URL link and attempts to open in WebView.

parametertypedescription
urlStringA url that was clicked
boolean onClickChatLink(String url)

onReceivePush

Notify when a guest gets notification from Channel. Parameter event contains the necessary information to display in-app push view. This method is useful when you want to customize the in-app push view.

parametertypedescription
pushEventPushEventa event contains in-app push information
void onReceivePush(PushEvent pushEvent)

willHideMessenger

Notify when channel plugin's user chat list is about to dismiss from view.

void willHideMessenger()

willShowMessenger

Notify when channel plugin's user chat list is about to present in view.

void willShowMessenger()