Skip to content

Commit

Permalink
set priority fix
Browse files Browse the repository at this point in the history
  • Loading branch information
aikei committed May 9, 2018
1 parent 902cbfb commit 99bfa58
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/android/FirebasePluginMessagingService.java
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ private void sendNotification(String id, String title, String messageBody, Map<S
.setAutoCancel(true)
.setSound(defaultSoundUri)
.setContentIntent(pendingIntent)
.setPriority(NotificationCompat.PRIORITY_MAX);
;

int resID = getResources().getIdentifier("notification_icon", "drawable", getPackageName());
Expand Down Expand Up @@ -170,6 +171,7 @@ private void sendNotification(String id, String title, String messageBody, Map<S
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.M) {
int accentID = getResources().getIdentifier("accent", "color", getPackageName());
notificationBuilder.setColor(getResources().getColor(accentID, null));

}

Notification notification = notificationBuilder.build();
Expand All @@ -180,7 +182,6 @@ private void sendNotification(String id, String title, String messageBody, Map<S
notification.contentView.setImageViewResource(iconID, notiID);
}
}
notification.setPriority(NotificationCompat.PRIORITY_MAX);
NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);

// Since android Oreo notification channel is needed.
Expand Down

0 comments on commit 99bfa58

Please sign in to comment.