Earl Reed
Posts: 0
Joined: Sun Oct 06, 2013 7:48 pm

In what file do I modify onNotificationGCM callback from Phonegap Push Plugin

I need my app to register the user device with pushwoosh?

This is what I'm trying to do:

// handle GCM notifications for Android
function onNotificationGCM(e) {
switch( e.event )
{
case 'registered':
if ( e.regid.length 0 )
{
// Your GCM push server needs to know the regID before it can push to this device
// here is where you might want to send it the regID for later use.
PushWoosh.appCode = "MY_PUSHWOOSH_APP_ID";
PushWoosh.register(e.regid, function(data) {
alert("PushWoosh register success: " + JSON.stringify(data));
}, function(errorregistration) {
alert("Couldn't register with PushWoosh" + errorregistration);
});

Code: Select all

      } 
      break;
Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

In what file do I modify onNotificationGCM callback from Phonegap Push Plugin

Hello! Sorry for delay. Have you checked example here https://github.com/phonegap-build/Pus.... Create new JS asset and add necessary code.

Return to “Issues”