remote push notification이 포그라운드에서 팝업되지 않아요
해결됨
배달앱 클론코딩 [with React Native]
핸드폰 상단바에서 알림 표시만 되고 알림 팝업은 되지 않습니다. localNotification을 활용해서 팝업시켜 봤지만 그렇게 될 경우 onNotification과 함께 중복된 알람 2개가 동시에 옵니다.그리고 상단바를 열어서 localNotification으로 온 알람을 press하게 되면 데이터가 빈 오브젝트로 넘어와서 Screen Navigate를 하지 못합니다. (onNotification로 발생하는 알림에서만 데이터를 활용할 수 있는 상황입니다) 결론은 onNotification로 온 알림이 팝업되어서 press를 하면 해당 화면을 이동시키는게 최종 목적이고 현재 포그라운드에서 알림 팝업이 안되는 이슈를 해결하고 싶습니다..계속 찾아봐도 답을 못 찾겠어서 질문 남깁니다! // AndroidManifest.xml <meta-data android:name="com.dieam.reactnativepushnotification.notification_foreground" android:value="true"/> <!-- Change the resource name to your App's accent color - or any other color you want --> <meta-data android:name="com.dieam.reactnativepushnotification.notification_color" android:resource="@color/white"/> <!-- or @android:color/{name} to use a standard color --> <receiver android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationActions" /> <receiver android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationPublisher" /> <receiver android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationBootEventReceiver" android:exported="true"> <intent-filter> <action android:name="android.intent.action.BOOT_COMPLETED" /> <action android:name="android.intent.action.QUICKBOOT_POWERON" /> <action android:name="com.htc.intent.action.QUICKBOOT_POWERON"/> </intent-filter> </receiver> <service android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationListenerService" android:exported="false" > <intent-filter> <action android:name="com.google.firebase.MESSAGING_EVENT" /> </intent-filter> </service> // App.tsx PushNotification.configure({ onNotification: function (notification: any) { PushNotification.localNotification({ message: notification.message, title: notification.title, channelId: 'channel_general', }) } }) PushNotification.createChannel( { channelId: 'channel_general', channelName: '앱', }, (created: boolean) => console.log(`createChannel returned '${created}'`), );
- react-native
- fcm
- push-notification
- library





