Support Topics Documentation Slack YouTube Blog

BackendlessBroadcastReceiver: Error processing push notification [Android]

Dear Team,
When i am trying to publish any message that is intended to be received by its subscriber but i don’t know why its received by push receiver is there any way i can isolate pub-Sub messages from push notification … i am using different channel for push notifications and pub-sub messages

Hi @Najam Agha
To receive pushes you have to register your device, to receive pub-sub you have to subscribe.
Here is sample code to register your device:

Backendless.Messaging.registerDevice( Defaults.GCMSenderId, channel, registrationCallback );

When sending your message you can set DeliveryOptions.pushPolicy. You can use it to distinguish between pushes and pub-subs.
There are two delivery modes:
PushPolicyEnum.ALSO - message will be delivered as Push and as Pub-Sub
PushPolicyEnum.ONLY - message will be deivered only as Push
Good luck!