Saturday 21 January 2017

Push notification via Urban Airship

In this tutorial, we will see how you can send push notification through urban airship.

Architecture diagram




Pre-requisite

  1. Android-SDK
  2. Intellij
You can get a working copy of android app with urban airship integration in https://github.com/Minisha/Urban-Airship-Push-Notification


Create a new app in urban airship, once its created it will take you to a quick start guide with the steps required to connect urban airship with mobile app. Follow all the steps in there, everything is quite straight forward except the last step: Add Google Cloud Messaging (GCM) API key which is explained in detail below




Add Google Cloud Messaging (GCM) API 

Goto http://docs.urbanairship.com/reference/push-providers/gcm.html#android-gcm-setup and register you app. Enable notification in the app by clicking on the notification tab. This step will create bunch of keys and user ids in cloud messaging tab and download google-services.json to your computer. From the json or from the setting project page get your app-key and package name and populate the urban airship project settings page. Once this is done, it will create a certificate to authenticate google server with urban airship.

Note: if you have problem in finding the gcmSender id, look in cloud messaging tab.

To connect server with urban airship

Follow the steps in: https://support.urbanairship.com/hc/en-us/articles/213491663-How-do-I-find-my-App-Key-or-App-Secret-

Thats it you are good to go.










No comments:

Post a Comment