Loading Example/www/index.html +1 −1 Changes for Example/www/index.html: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -89,7 +89,7 @@ if ( e.regid.length > 0 ) { $("#app-status-ul").append('<li>REGISTERED -> REGID:' + e.regid + "</li>"); console.log("regID = " + regID); console.log("regID = " + e.regID); // 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. } Loading src/android/com/google/android/gcm/GCMIntentService.java +16 −2 Changes for src/android/com/google/android/gcm/GCMIntentService.java: 16 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -102,10 +102,24 @@ public class GCMIntentService extends GCMBaseIntentService { .setWhen(System.currentTimeMillis()) .setContentTitle(appName) .setTicker(appName) .setContentText(extras.getString("message")) .setNumber(Integer.parseInt(extras.getString("msgcnt"))) .setContentIntent(contentIntent); String message = extras.getString("message"); if (message != null) { mBuilder.setContentText(message); } else { mBuilder.setContentText("<missing message content>"); } String msgcnt = extras.getString("msgcnt"); if (msgcnt != null) { mBuilder.setNumber(Integer.parseInt(msgcnt)); } mNotificationManager.notify(notificationID, mBuilder.build()); try Loading src/android/com/plugin/GCM/PushPlugin.java +2 −0 Changes for src/android/com/plugin/GCM/PushPlugin.java: 2 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -75,6 +75,8 @@ public class PushPlugin extends Plugin { else if (UNREGISTER.equals(action)) { GCMRegistrar.unregister(this.ctx.getContext()); GCMRegistrar.onDestroy(this.ctx.getContext()); Log.v(ME + ":" + UNREGISTER, "GCMRegistrar.unregister called "); result = new PluginResult(Status.OK); } Loading Loading
Example/www/index.html +1 −1 Changes for Example/www/index.html: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -89,7 +89,7 @@ if ( e.regid.length > 0 ) { $("#app-status-ul").append('<li>REGISTERED -> REGID:' + e.regid + "</li>"); console.log("regID = " + regID); console.log("regID = " + e.regID); // 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. } Loading
src/android/com/google/android/gcm/GCMIntentService.java +16 −2 Changes for src/android/com/google/android/gcm/GCMIntentService.java: 16 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -102,10 +102,24 @@ public class GCMIntentService extends GCMBaseIntentService { .setWhen(System.currentTimeMillis()) .setContentTitle(appName) .setTicker(appName) .setContentText(extras.getString("message")) .setNumber(Integer.parseInt(extras.getString("msgcnt"))) .setContentIntent(contentIntent); String message = extras.getString("message"); if (message != null) { mBuilder.setContentText(message); } else { mBuilder.setContentText("<missing message content>"); } String msgcnt = extras.getString("msgcnt"); if (msgcnt != null) { mBuilder.setNumber(Integer.parseInt(msgcnt)); } mNotificationManager.notify(notificationID, mBuilder.build()); try Loading
src/android/com/plugin/GCM/PushPlugin.java +2 −0 Changes for src/android/com/plugin/GCM/PushPlugin.java: 2 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -75,6 +75,8 @@ public class PushPlugin extends Plugin { else if (UNREGISTER.equals(action)) { GCMRegistrar.unregister(this.ctx.getContext()); GCMRegistrar.onDestroy(this.ctx.getContext()); Log.v(ME + ":" + UNREGISTER, "GCMRegistrar.unregister called "); result = new PluginResult(Status.OK); } Loading