This tutorial will show you how to setup Android Push Notifications for your app on SashiDo.
Setup your GCM Credentials
Create or login into google to get your Android application credentials (GCM Sender ID and GCM API Key).
The "GCM Sender ID" is a public number that identifies the sender of a push notification. You can get it from the
Dashboard by clicking on your project as displayed below. It is listed as "Project number".
The GCM API Key is a server secret that allows a server to send pushes to a registration ID on behalf of a particular sender ID and can be obtained from the Credentials tab as shown below. You have to create android type API pair.
Apparently google have dropped the support for unrestricted keys.
And now when creating API key you need to restrict it.
To be able to send push notification to GCM with SashiDo you need to use IP Addresses restriction: 18.104.22.168/8. Here is a short video showing how to do this:
How to setup your Application in SashiDo
Navigate to the SashiDo Dashboard. Select your application and go to App Settings then Push menu, where you will see three sections with settings.
In the Android Push Credentials section add your "GCM Sender ID" and "GCM API Key".
Sample Android Push Notification Application
You can clone and use our sample application to test Push Notifications on SashiDo.
Navigate to your App Settings tab. Select the Security & Keys menu and you will see a list of keys. Three of these keys are relevant for the Push notifications and need to be copied to your application code.
Next you have to copy "Application ID", "Client Key" and "Server URL" into the respective place holders in the
AppConfig.java file in your project as shown below. Similarly, for the "GCM_SENDER_ID" string add the GCM Sender ID value that you collected in the beginning of this tutorial.
Finally, you can test your app Push Notifications
Check if your application receive the push notification. If you have any issues, please let us know.
Happy Sending :)