Guest User

Untitled

a guest
Oct 17th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. onNotification: function(notification) {
  2. console.log( 'NOTIFICATION:', notification );
  3. const { data } = notification;
  4. ChannelIO.isChannelPushNotification(data).then((isChannelNotification) => {
  5. if (Platform.OS === 'ios') {
  6. if (isChannelNotification && notification.userInteraction) {
  7. ChannelIO.handlePushNotification(data);
  8. }
  9. } else if(Platform.OS === 'android') {
  10. if (isChannelNotification && !notification.userInteraction) {
  11. ChannelIO.handlePushNotification(data);
  12. }
  13. }
  14.  
  15. notification.finish(PushNotificationIOS.FetchResult.NoData);
  16. })
  17. },
Add Comment
Please, Sign In to add comment