phonegap-pushplugin

How to handle Push notification when application is resumed?

北城余情 提交于 2019-11-27 09:32:04
Trying to handled push Notification using PushPlugin . Following is my code. onNotificationGCM: function(e) { switch( e.event ) { case 'registered': if ( e.regid.length > 0 ) { console.log("Regid " + e.regid); //alert('registration id = '+e.regid); sDeviceId = e.regid; //alert(sDeviceId); } break; case 'message': // this is the actual push notification. its format depends on the data model from the push server alert('message = '+e.message); alert('message = '+e.message+' msgcnt = '+e.msgcnt); if ( e.foreground ) { alert("Notification Received"); } else { // otherwise we were launched because

How to handle Push notification when application is resumed?

让人想犯罪 __ 提交于 2019-11-26 14:47:44
问题 Trying to handled push Notification using PushPlugin. Following is my code. onNotificationGCM: function(e) { switch( e.event ) { case 'registered': if ( e.regid.length > 0 ) { console.log("Regid " + e.regid); //alert('registration id = '+e.regid); sDeviceId = e.regid; //alert(sDeviceId); } break; case 'message': // this is the actual push notification. its format depends on the data model from the push server alert('message = '+e.message); alert('message = '+e.message+' msgcnt = '+e.msgcnt);