Android Push Notifications on SashiDo

Pavel Ivanov

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".

Google Cloud Dashboard

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: 52.0.0.0/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.

Open the AndroidManifest.xml file in your Android project and replace your GCM Sender ID as the value "GCM_SENDER_ID" in the following line:

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 :)

Pavel Ivanov

Head of UI/UX Innovations @ CloudStrap & SashiDo

Find answers to all your questions

Our Frequently Asked Questions section is here to help.







Latests news

Announcing Automatic Database Backups

Having a Backup is a matter of great importance. Just recently GitLab reminded us that mistakes do happen sometimes. We, as a service, couldn't afford to lose any clients data, so we have always had internal disaster recovery backups of all the data on our servers ...

Read More

How to set up iOS push notifications in SashiDo

Push notifications allow you to stay in touch with your users and make it possible for your users to communicate with each other. Before you begin, remember that push notifications are not available in the iOS Simulator. You will need an iOS device, as well as an Apple certificate ...

Read More