-
|
My team has started to build some native (Java/Kotlin) display logic for specific notifications, opting for a native-first approach instead of leveraging the OSS React ecosystem for rendering (e.g., Notifee). However at the moment this involves a roundtrip to React where react-native-firebase "wakes up" React Native via It'd be lovely if there was a clean way for the app to plug-in to React Native Firebase and say "no, please allow me" and conditionally take over the handling of a RemoteMessage. For many of these notifications the FCM payload has everything we need in order to build a notification so there's no need to wake up React at all - we can do that if the user presses on the notification or one of its inline actions - but we'd like to keep using the existing react-native-firebase behavior by default, for notifications that we aren't giving special "rich, native" treatment to. One major benefit of allowing this behavior is it'd enable an app to support "data-only" messages while background when the priority is not "high". Today, react-native-firebase requires "high" priority in order to invoke the HeadlessJS service that handles the notification payload when the app wasn't already active. I believe if the app's code were able to handle the RemoteMessage payload (without HeadlessJS) instead, we wouldn't need to rely on the priority in this situation. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
|
I believe what you want is in the AndroidManifest merge process, where you may use an |
Beta Was this translation helpful? Give feedback.
I believe what you want is in the AndroidManifest merge process, where you may use an
android:toolsentry toremovean entry from the manifest during merge. So you'd remove the receiver in your app AndroidManifest.xml then delegate to the receiver methods directly from your receiver if desired?