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

How to make your Mobile Application GDPR Ready

At SashiDo we certainly care about our customers and we strive to be up-to-date on the horizon of the novelties coming up. We’re all working on GDPR these days and we want to help people understand what it is. What does GDPR mean? In February we announced that GDPR is coming and SashiDo.io is getting ready and now we will be more specific on how to make sure your mobile app is prepared for the upcoming changes in the European Union region.

Read More

SashiDo Acquires Octobas

SashiDo is pleased to announce its recent acquisition of all the assets of Octobas.com, a robust and scalable backend for mobile and web apps based on Parse Open Source. For the past 2 years our mission has been to become a leading Parse Server hosting provider in the mobile and web apps development world as well as to continue improving our service, launching new features and providing quality and security to our customers.

Read More