This issue typically occurs on Android when your application uses another Firebase Cloud Messaging (FCM) service in addition to the Pushwoosh SDK. If another service intercepts a Pushwoosh notification first, it may not know how to parse the content, resulting in a blank push being displayed.
When multiple FirebaseMessagingService implementations are present in an app, you must ensure that Pushwoosh notifications are correctly processed by the Pushwoosh SDK. You can resolve this in one of two ways:
1. Set Service Priority
Ensure that the Pushwoosh service has the highest priority in your AndroidManifest.xml file. This allows the Pushwoosh SDK to process its notifications before any other service.
Add the tools:node="replace" attribute and set a high priority for the com.pushwoosh.firebase.PushFcmIntentService intent-filter, for example, 100.
<service android:name="com.pushwoosh.firebase.PushFcmIntentService" android:exported="false">
<intent-filter android:priority="100" tools:node="replace">
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
2. Implement a Routing Service
A more robust method is to create a single "router" service that receives all FCM messages and forwards them to the appropriate SDK for handling. This prevents conflicts and ensures each push provider processes its own payloads.
Your router service will:
1. Extend FirebaseMessagingService.
2. In the onMessageReceived method, check if the received RemoteMessage is from Pushwoosh using Pushwoosh.handleFCMMessage().
3. If it's a Pushwoosh message, our SDK will handle it. If not, pass it to your other push provider's logic.
For detailed instructions and code examples on how to implement a routing service, please see our official documentation: Using Pushwoosh SDK with other FCM services.
Comments
0 comments
Please sign in to leave a comment.