【发布时间】:2019-07-31 12:46:21
【问题描述】:
有没有办法在 React Native 应用程序中同时使用 localNotificationSchedule 和 Firebase 远程推送通知? 使用https://github.com/zo0r/react-native-push-notification 上的公共库表示 AndroidManifest.xml 需要两个不同的服务
<!-- < Only if you're using GCM or localNotificationSchedule() > -->
<service
android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationListenerServiceGcm"
android:exported="false" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
</intent-filter>
</service>
<!-- </ Only if you're using GCM or localNotificationSchedule() > -->
<!-- < Else > -->
<service
android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationListenerService"
android:exported="false" >
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<!-- </Else> -->
那么我必须选择其中一个吗?
【问题讨论】:
标签: reactjs firebase react-native push-notification firebase-cloud-messaging