Search Chirayu Software Solutions Blog

Wednesday, May 25, 2016

Push Notification in Phonegap for Android and iPhone App

Install phonegap CLI first to start the process.

$ npm install -g phonegap@latest

Create Basic Push Notification App for Phone Gap using following link

$ phonegap create myApp --template phonegap-template-push

Topic Subscription

// your RegistrationID paste here which is received from GCM server.
string regId = "";
// applicationID means google Api key
var applicationID = "AIzaSyCqxI79xHHggignZvtqOA0oFnjB7M1gmac";
// SENDER_ID is nothing but your ProjectID (from API Console- google code)//
var SENDER_ID = "637808462189:";