Push Notification Setup (Android)

Top  Previous  Next

Backendless can deliver published messages as push notifications to Android devices. Additionally, Backendless Console can be used to publish push notifications. In order to deliver a push notification to Android, the backend must be configured with Google API Key:

1.Login to Google Services Console.
2.Click the Get started. Pick a platform button.
server-key-step1
3.Click Enable services for my Android App:
server-key-step2
4.Select your Android app from the list. if the app is not in the list, enter the name of the app, it will be automatically registered in the Google Developer Console.
5.Enter Android package name of your app.
6.Click Continue to Choose and configure services.
server-key-step3
7.Click Cloud Messaging and then click Enable Google Cloud Messaging:
server-key-step4
8.Google generates API key and sender ID. Copy Server API Key:
generated-ids
9.Open Backendless Console and select your application.
10.Click Manage and scroll down to Mobile Settings.
11.Paste the Google API Key into corresponding field located under the Android Push Notifications label:
google-api-key-backendless-console
12.Click Save. At this point the backend is configured and is ready to publish push notifications to Android devices.

 

Google Project Number (Sender ID)

In your project you should register the device in order to receive or send push notifications. To accomplish this, do the following:

1.Return to Step 8 in the instructions above.
2.Copy Sender ID.
3.Use the Sender ID value in Backendless.Messaging.registerDevice(...) method as GCMSenderID argument. For example:
google-project-number-in-code


Please let us know how we can improve the documentation by leaving a comment. All technical questions should be posted to the Backendless Support forum. We do not respond to the technical questions on the documentation pages.: