Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- onNotification: function(notification) {
- console.log( 'NOTIFICATION:', notification );
- const { data } = notification;
- ChannelIO.isChannelPushNotification(data).then((isChannelNotification) => {
- if (Platform.OS === 'ios') {
- if (isChannelNotification && notification.userInteraction) {
- ChannelIO.handlePushNotification(data);
- }
- } else if(Platform.OS === 'android') {
- if (isChannelNotification && !notification.userInteraction) {
- ChannelIO.handlePushNotification(data);
- }
- }
- notification.finish(PushNotificationIOS.FetchResult.NoData);
- })
- },
Add Comment
Please, Sign In to add comment