Skip to content

Commit

Permalink
Fix setting of 'largeIcon'
Browse files Browse the repository at this point in the history
Set largeIcon before building the notification, otherwise the icon would not be set.
  • Loading branch information
mkapostolov authored Jun 1, 2017
1 parent 9853a69 commit 5f090da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/android/com/plugin/gcm/CordovaGCMBroadcastReceiver.java
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,13 @@ public void createNotification(Context context, Bundle extras) {
mBuilder.setDefaults(defaults);
}

final Notification notification = mBuilder.build();
final int largeIcon = getLargeIcon(context, extras);
if (largeIcon > -1) {
final Bitmap bitmap = BitmapFactory.decodeResource(context.getResources(), largeIcon);
mBuilder.setLargeIcon(bitmap);
}


final Notification notification = mBuilder.build();
mNotificationManager.notify(appName, notId, notification);
}

Expand Down

0 comments on commit 5f090da

Please sign in to comment.