Push Notifications

Hi, I just started setting up push notifications for my android app and have a few questions:

  1. GCM no longer requires the GET_ACCOUNTS permission to send/receive notifications but in the docs it says its required. Does my app require that permission?
  2. The registration of a device with Backendless is done in the Application class which is run every time the app is started. So is the device registered again every time? Hence an extra API call? Some insight on this would be great
  3. In the console for sending a push notification, we’re given 2 options. To send it as a broadcast or/and as a push notification. What’s the difference b/w them?
    Thanks
  1. Now we are using previous api, and our code require that permission. You can also comment the part of your code and check it.
  2. It depends on your code. You can move registration device logic to separate method and invoke it for example on button press.
  3. Try to investigate our documentation:
    https://backendless.com/documentation/messaging/android/messaging_publish_push_notifications.htm
  1. Removing the permission has no effect on the expected results. All notifications are delivered. (Update docs maybe?)

  2. No idea

  3. Makes no difference on Android

Hi Aashir,

Thanks for pointing about GCM permission. We shall check it and update the docs if needed.

The device registration call should better be always done when the app starts, because the device registration might expire on Google (sometimes it just happens with GCM).

Broadcast publishing means publishing to all devices as a simple pub-sub message.