ChannelEventEmitter
ChannelEventEmitter
is a object that you can use to listen on a specific ChannelIO
event directly.
import { ChannelEventEmitter, ChannelIO } from 'react-native-channel-plugin';
let subscription = ChannelEventEmitter.addListener(ChannelIO.Event.ON_CHANGE_BADGE, (count) => {
//do something with count
});
//dont forget to remove subscription on componentDidUnmount
subscription.remove();
Events
Name | Description |
---|---|
ChannelIO.Event.ON_CHANGE_BADGE | user's badge count has been changed |
ChannelIO.Event.ON_RECEIVE_PUSH | user has received push message |
ChannelIO.Event.ON_CLICK_CHAT_LINK | user has clicked on a link |
ChannelIO.Event.WILL_SHOW_MESSENGER | ChannelIO messenger is about to display |
ChannelIO.Event.WILL_HIDE_MESSENGER | ChannelIO messenger is about to dismiss |
ChannelIO.Event.ON_CLICK_REDIRECT_LINK (deprecated) | user has click push bot's image |
Updated about 1 year ago