Receive PUSH notification in custom Receiver extending BackendlessBroadcastReceiver.

I am able to receive push notification by using the default “BackendlessBroadcastReceiver” receiver.
I intent to receive PUSH notification in a custom receiver.

I have declared my receiver in Manifest as below-

        <action android:name="" />
        <action android:name="" />

        &lt;category android:name=&quot;; /&gt;

PushReceiver as follows below -

public class PushReceiver extends BackendlessBroadcastReceiver {

    public boolean onMessage(Context context, Intent intent) {

        CharSequence tickerText = intent.getStringExtra( PublishOptions.ANDROID_TICKER_TEXT_TAG );
        CharSequence contentTitle = intent.getStringExtra( PublishOptions.ANDROID_CONTENT_TITLE_TAG );
        CharSequence contentText = intent.getStringExtra( PublishOptions.ANDROID_CONTENT_TEXT_TAG );
        String message = intent.getStringExtra( PublishOptions.MESSAGE_TAG ); mBuilder =

        NotificationManager mNotificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);


        return true;


I’m not sure whether PUSH notification are received or not but the notification is not displayed.

Hi Ketan,

Sounds like you’re asking us to debug your code… :wink: We’d be happy to do it, but that would be outside of support. Contact to discuss your options.


Hi Mark. Nah I would like to know that what I did is it correct or not?


Please understand, we provide support for our APIs and backend. When you start customizing things this goes outside of the support charter. If I says “yes, what you did is correct”, but if things will not work - you will say “what did I do wrong?”. The source code for our receive is right there. You’re welcome to debug your code (and ours if you want to), however, when it comes to reviewing derivatives from our code, this is where we draw the line for free support.


Hello Mark, I’m interested in displaying the Push “Message” in Android Activity. Can you please tell me how to do that using default “BackendlessBroadcastReceiver”.

Sure, take a look at the following code:

BackendlessBroadcastReceiver calls onMessage. If the method returns false, then the default visualization logic is disabled. In your implementation of onMessage you can do whatever you want with the push notification.

Okay. Thanks Mark.