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
feat: add androidPushFallback option to the Expo plugin
When expo-notifications is installed, the generated
IntercomFirebaseMessagingService forwards every non-Intercom FCM
message to expo-notifications for display. Apps that use another
push provider (e.g. OneSignal) get each push displayed twice,
because such providers receive pushes through a broadcast receiver,
so the existing FCM-service detection never triggers for them.
androidPushFallback lets apps choose what the generated service does
with non-Intercom messages: 'expo-notifications' (forward, current
behavior) or 'none' (ignore). Absent, behavior is unchanged.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -537,6 +537,7 @@ The plugin provides props for extra customization. Every time you change the pro
537
537
-`iosApiKey` (_string_): iOS API Key from Intercom.
538
538
-`intercomRegion` (_string_): Region for Intercom `US`, `EU`, `AU`. Optional. Defaults to `US`.
539
539
-`useManualInit` (_boolean_): Set to `true` to manually initialize Intercom from JavaScript instead of at app startup. Optional. Defaults to `false`.
540
+
-`androidPushFallback` (_string_): What the generated Android messaging service does with push messages that are not from Intercom. `"expo-notifications"` forwards them to `expo-notifications` for handling and display (requires `expo-notifications` to be installed). `"none"` ignores them and also stops forwarding new FCM tokens to `expo-notifications` push token listeners; use it when another push provider (e.g. OneSignal, Braze) displays its own notifications, to avoid duplicates. Optional. Defaults to `"expo-notifications"` when `expo-notifications` is installed, `"none"` otherwise.
540
541
541
542
```json
542
543
{
@@ -655,6 +656,8 @@ The Expo plugin automatically generates a `FirebaseMessagingService` for Android
655
656
656
657
> **Note**: If your app uses another SDK that registers its own `FirebaseMessagingService` (e.g. OneSignal, Braze), list `@intercom/intercom-react-native` **before** that SDK in your `plugins` array. This allows the plugin to detect the other service and skip its own registration, avoiding conflicts.
657
658
659
+
> **Note**: Some push providers (e.g. OneSignal) receive FCM messages through their own broadcast receiver instead of a `FirebaseMessagingService`, so the detection above never triggers for them. If `expo-notifications` is also installed, the generated service then forwards the provider's pushes to `expo-notifications`, and each push is displayed twice. Set `"androidPushFallback": "none"` in the plugin props so the generated service handles Intercom pushes only and ignores everything else.
660
+
658
661
#### Expo: Push notification deep links support
659
662
660
663
> **Note**: You can read more on Expo [documentation](https://docs.expo.dev/guides/deep-linking)
0 commit comments