Handling Multiple Push Providers

Common issues with using multiple push providers under one mobile app

Recommended SDKs

We recommend using the latest version of the OneSignal SDK when testing multiple push providers in the same app.

Example:
iOS 3.11.3+
Flutter 3.4.2+

Invalid Push Token

The OneSignal SDK checks for a push token upon initialization and registers the token if the device is subscribed but missing a valid token.

In some instances, third-party push provider SDKs will provide a method to generate a push token. Some of these third-party push providers' SDKs will invalidate the token generated by OneSignal hence causing notification issues as shown below:

1059

The token OneSignal generated will become invalid until the user opens the app again which will set the new token in OneSignal.

User will not get push from OneSignal until they open the app again. As a solution, please use our SDK to send your push provider the token generated by OneSignal instead.

Get device's push token identifier using our getDeviceState() method:
https://documentation.onesignal.com/docs/sdk-reference#push-notification-properties

Get device's identifier using our View Device API request:
https://documentation.onesignal.com/reference/view-device

Firebase Conflicts

Please check your Android Manifest file and double-check that the following line is not interfering nor blocking your notifications.
com.google.firebase.iid.FirebaseInstanceIdReceiver

OneSignal’s Push Payload

When getting the OSNotification payload back with a notification event handler, OneSignal's Push Payload contains a "custom" key with a nested "i" value, which must be included for our SDK to handle the push notification. If this is detected by OneSignal, it will know to "do" something with the notification.

If that value does not exist, OneSignal will not touch the notification. As long as the other SDK knows not to touch anything that comes back with that value in the payload, they should be able to work in parallel together.

Here is more information in regards to this payload and the properties that come back from OneSignal's end:
https://documentation.onesignal.com/docs/osnotification-payload

and more specifics on the custom push payload:
https://documentation.onesignal.com/docs/how-notifications-work#onesignal-custom-push-payload

Our SDK picks GMS over HMS if both are available. To be considered "available" both the library (hms-push or firebase-messaing) and the device APK ("Google Play services" or "HMS Core") have to be present

🚧

If you're using multiple push providers and currently experiencing any issues, please send our support team a debug log with both the app id and reproductions steps as this can help us uncover any unwanted occurrences.

To capture a debug log, please follow this guide: https://documentation.onesignal.com/docs/capturing-a-debug-log