diff --git a/plugin.xml b/plugin.xml index 96d171a9..b3b898ad 100755 --- a/plugin.xml +++ b/plugin.xml @@ -2,8 +2,8 @@ + id="com.clavei.phonegap.plugins.PushPlugin" + version="2.2.7"> PushPlugin Bob Easterday diff --git a/src/android/com/plugin/gcm/GCMIntentService.java b/src/android/com/plugin/gcm/GCMIntentService.java index caee145e..fbfb8291 100644 --- a/src/android/com/plugin/gcm/GCMIntentService.java +++ b/src/android/com/plugin/gcm/GCMIntentService.java @@ -98,23 +98,25 @@ public void createNotification(Context context, Bundle extras) } catch (NumberFormatException e) {} } + + String message = extras.getString("message"); + if (message == null) { + message = ""; + } + NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(context) .setDefaults(defaults) .setSmallIcon(context.getApplicationInfo().icon) .setWhen(System.currentTimeMillis()) .setContentTitle(extras.getString("title")) + .setStyle(new NotificationCompat.BigTextStyle() + .bigText(message)) .setTicker(extras.getString("title")) + .setContentText(message) .setContentIntent(contentIntent) .setAutoCancel(true); - String message = extras.getString("message"); - if (message != null) { - mBuilder.setContentText(message); - } else { - mBuilder.setContentText(""); - } - String msgcnt = extras.getString("msgcnt"); if (msgcnt != null) { mBuilder.setNumber(Integer.parseInt(msgcnt));