guide for implementing gcm push using smp cloud platform

Upload: sumit-mukund

Post on 12-Oct-2015

27 views

Category:

Documents


0 download

DESCRIPTION

Guide for Implementing GCM Push Using SMP Cloud Platform Text

TRANSCRIPT

Guide for Implementing GCM Push Using SMP Cloud PlatformIncludes code snippets for getting GCM Registration Id and receiving Push NotificationsAuthor: Sirisha PabbitiGuide for Implementing GCM Push Using SMP Cloud Platform2TABLE OF CONTENTSINTRODUCTION ............................................................................................................................................... 3PREREQUISITES .............................................................................................................................................. 3STEPS ............................................................................................................................................................... 31. SMP: ENABLING THE APPLICATION FOR GCM PUSH ............................................................... 32. CLIENT SIDE IMPLEMENTATION ................................................................................................... 4 ............................................... 4FURTHER INFORMATION ............................................................................................................................... 5REFERENCES .................................................................................................................................................. 5Guide for Implementing GCM Push Using SMP Cloud Platform3INTRODUCTIONSAP Mobile Platform (SMP), enterprise edition, cloud version can be used to build lightweight, on-demand applications. The platform offers authentication, secure on-boarding, native push notifications and reporting capabilities for enterprise mobile applications.This document will guide you on how to configure and receive GCM (native android push) push via SMP server.PREREQUISITES? A SAP HANA Cloud account subscribed SAP Mobile Platform application. For more information on how to obtain a HANA account with SMP, refer the below link.(https://help.hana.ondemand.com/mobile/frameset.htm?doc/html/mdw1361529553461.html)? An Application created in SMP Administration portal.? Android application to register with SMP cloud.? Project ID and API key from Google console, refer the below link to get project Id and API key.(http://developer.android.com/guide/google/gcm/gs.html)STEPS1. SMP: ENABLING THE APPLICATION FOR GCM PUSHSelect the Application for which GCM notification service should be enabled from Applications tab. Now go to PUSH tab inside the application and give API Key and Project ID (Sender ID) and save the application.Now the application is enabled for GCM push Notifications.This configuration is one time process done by the Administrator, Clients using this application can get the settings to their device and use them in further process of registration.Guide for Implementing GCM Push Using SMP Cloud Platform42. CLIENT SIDE IMPLEMENTATION2.1 The Android Manifest.xml should be modified with the following tags.Manifest.xmlThe application will need particular manifest elements in order to participate in GCM. The following section should be added to the AndroidManifest.xml, with the package name of the application substituted for the com.example.gcmdemo string below. This section registers the GCMReceiver broadcast receiver. Note that these tags must be within the section of the manifest.