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.

http://docs.phonegap.com/getting-started/1-install-phonegap/cli/

$ npm install -g phonegap@latest

Create Basic Push Notification App for Phone Gap using following link

http://docs.phonegap.com/develop/push-notifications/

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

http://www.tejaprakash.com/2013/05/push-messages-to-gcm-server-using-net.html

http://www.tejaprakash.com/2013/02/google-cloud-messaging-for-android.html

http://dev.tapjoy.com/faq/how-to-find-sender-id-and-api-key-for-gcm/

https://github.com/phonegap/phonegap-plugin-push/blob/master/docs/PHONEGAP_BUILD.md#adding-resources

Topic Subscription

https://developers.google.com/cloud-messaging/topic-messaging#response-format

https://www.pubnub.com/blog/2014-12-22-sending-ios-push-notifications-via-apns-javascript-using-apns-phonegap/


// 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:";