Page 1 of 1

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

Posted: Fri Oct 18, 2013 4:07 am
by Earl Reed

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;

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

Posted: Fri Oct 18, 2013 4:29 am
by Alena Prykhodko

Hello!

We'll check and update.


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

Posted: Fri Oct 18, 2013 6:35 pm
by Maryna Brodina

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