Backendless Support
 
Answered

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

Leave a Comment

Comments (1)

photo
1

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:

  1. 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!