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

NameDescription
ChannelIO.Event.ON_CHANGE_BADGEuser's badge count has been changed
ChannelIO.Event.ON_RECEIVE_PUSHuser has received push message
ChannelIO.Event.ON_CLICK_CHAT_LINKuser has clicked on a link
ChannelIO.Event.WILL_SHOW_MESSENGERChannelIO messenger is about to display
ChannelIO.Event.WILL_HIDE_MESSENGERChannelIO messenger is about to dismiss
ChannelIO.Event.ON_CLICK_REDIRECT_LINK (deprecated)user has click push bot's image