【发布时间】:2020-09-11 02:18:12
【问题描述】:
大家好
我使用库 wix/react-native-notifications
看起来我的 android 出了点问题(ios 工作正常)。 对我来说:
- registerRemoteNotificationsRegistered
- registerRemoteNotificationsRegistered
- registerNotificationOpened
- getInitialNotification
干得好。
但是:
- registerNotificationReceivedForeground
- registerNotificationReceivedBackground
从未触发过。
我认为我在 AndroidManifest.xml 中放了一些错误(我尝试了不同的变体,但它仍然不起作用)。
或使用时出现问题
- 反应原生通知
- react-native-pusher-push-notifications
同时。
请问有人有什么想法吗?
我用:
- "react-native-notifications": "^3.2.2",
- “react-native-pusher-push-notifications”:“^2.4.0”,
- “反应”:“16.9.0”,
- "react-native": "0.61.5",
AndroidManifest.xml 中我认为可能有误的部分:
<service
android:name=".java.MyFirebaseMessagingService"
android:exported="false"
>
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT"/>
</intent-filter>
</service>
【问题讨论】:
标签: android react-native pusher velo react-native-notifications