If you would like to have your own push receiver to handle all the push messages coming from Blueshift and other channels who use FCM, you need to override the FCM implementation done by the Blueshift Android SDK. This is required if you want to get callback when FCM token changes.

Note: This change requires SDK version 2.0.2 or above

Override BlueshiftMessagingService

public class YourMessagingService extends BlueshiftMessagingService {

public void onMessageReceived(RemoteMessage remoteMessage) {
* It is important to keep the super.onMessageReceived()
* call if you
want the SDK to do the notification rendering
* for push messages
coming from the Blueshift server.
* If you want to completely override
the notification rendering,
* skip this call and implement your code. */


public void onNewToken(String newToken) {

* Use the new token in your app. the super call is important
* for the
SDK to do the analytical part and notification
* rendering. Make sure
that it is present when you override
* onNewToken() method.

Update AndroidManifest.xml

        <action android:name="com.google.firebase.MESSAGING_EVENT"/>
Was this article helpful?
0 out of 0 found this helpful



Please sign in to leave a comment.