Hi everyone
I use library wix/react-native-notifications
It looks like I do something wrong with my android (ios works fine). For me:
- registerRemoteNotificationsRegistered
- registerRemoteNotificationsRegistered
- registerNotificationOpened
- getInitialNotification
work good.
But:
- registerNotificationReceivedForeground
- registerNotificationReceivedBackground
have never triggered.
I think I put something wrong in AndroidManifest.xml (I have tried different variant but it still doesn't work).
Or problem occurs from using
- react-native-notification
- react-native-pusher-push-notifications
at the same time.
Please maybe someone have some ideas?
I use:
- "react-native-notifications": "^3.2.2",
- "react-native-pusher-push-notifications": "^2.4.0",
- "react": "16.9.0",
- "react-native": "0.61.5",
Part of AndroidManifest.xml that I think can be wrong:
<service
android:name=".java.MyFirebaseMessagingService"
android:exported="false"
>
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT"/>
</intent-filter>
</service>
Ok, maybe it will be helpful for someone or just start some discussions )
Well, from my understanding the
react-native-pusher-push-notificationshandle notification first, so libraryreact-native-notificationscan't catch that.Not the better decision but it will works before I find better solution.
I modified file
PusherWrapper.javainreact-native-pusher-push-notificationslibrary to handle more information. The main problem was that library doesn't return info that send indatapart of notification.