You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
with Android Q+ and current Google Play Services, android does notification delegation by
default now for REST v1 API FCM, but this causes react-native-firebase message handlers to fail
Implement a feature toggle in AndroidManifest.xml via firebase.json that defaults to false so
most users won't be affected
Implement the programmatic APIs to dynamically set and fetch current state for the feature as well
Copy file name to clipboardExpand all lines: docs/messaging/usage/index.md
+10
Original file line number
Diff line number
Diff line change
@@ -64,6 +64,16 @@ If you require `remote notification` on Expo, you can also add this to your Expo
64
64
}
65
65
```
66
66
67
+
## Android - Google Play Notification Delegation
68
+
69
+
If you use the REST v1 APIs (used by the Firebase admin SDKs) and your app is running on Android Q+ with current Google Play services, Google implemented "Notification Delegation" for messages. Notification delegation is not currently compatible with react-native-firebase. Specifically, if your notifications are delegated via proxy to Play Services, then your messaging listeners will not be called.
70
+
71
+
To work around this incompatibility, react-native-firebase disables notification delegation by default currently, using the `AndroidManifest.xml` method listed as one of the options described here: <https://firebase.google.com/docs/cloud-messaging/android/message-priority#proxy>.
72
+
73
+
You may re-enable notification delegation if your use case requires it and you can accept the messaging listener methods not executing for delegated messages by altering the firebase.json setting `messaging_android_notification_delegation_enabled` to `true`.
74
+
75
+
You may also use the new messaging APIs to get and set the notification delegation state for the app, as desired.
76
+
67
77
# What does it do
68
78
69
79
React Native Firebase provides native integration of Firebase Cloud Messaging (FCM) for both Android & iOS. FCM is a cost
Copy file name to clipboardExpand all lines: packages/app/firebase-schema.json
+5-6
Original file line number
Diff line number
Diff line change
@@ -56,12 +56,7 @@
56
56
"app_log_level": {
57
57
"description": "Set the log level across all modules. Only applies to iOS currently. Can be 'error', 'warn', 'info', 'debug'.\n Logs messages at the configured level or lower.\n Note that if an app is running from AppStore, it will never log above info even if level is set to a higher (more verbose) setting",
58
58
"type": "string",
59
-
"enum": [
60
-
"error",
61
-
"warn",
62
-
"info",
63
-
"debug"
64
-
]
59
+
"enum": ["error", "warn", "info", "debug"]
65
60
},
66
61
"app_check_token_auto_refresh": {
67
62
"description": "If this flag is disabled then Firebase App Check will not periodically auto-refresh the app check token.\n This is useful for opt-in-first data flows, for example when dealing with GDPR compliance. \nIf unset it will default to the SDK-wide data collection default enabled setting. This may be overridden dynamically in Javascript.",
"description": "On Android Q+ and current Play Services, your FCM may be delegated which disables firebase message listeners. Disabled by default. You may re-enable if necessary",
100
+
"type": "boolean"
101
+
},
103
102
"messaging_android_notification_channel_id": {
104
103
"description": "On Android, any message which displays a Notification use a default Notification Channel (created by FCM called `Miscellaneous`). This channel contains basic notification settings which may not be appropriate for your application. You can change what Channel is used by updating the `messaging_android_notification_channel_id` property.",
Copy file name to clipboardExpand all lines: packages/messaging/android/src/main/java/io/invertase/firebase/messaging/ReactNativeFirebaseMessagingModule.java
0 commit comments