Merge pull request #950 from jotomo/oreo-persistent-notification-annoyance

Make persistent notification not peak on every update on Oreo.
This commit is contained in:
Milos Kozak 2018-05-01 20:08:17 +02:00 committed by GitHub
commit 537be09493
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -138,6 +138,7 @@ public class PersistentNotificationPlugin extends PluginBase {
NotificationCompat.Builder builder = new NotificationCompat.Builder(ctx, CHANNEL_ID);
builder.setOngoing(true);
builder.setOnlyAlertOnce(true);
builder.setCategory(NotificationCompat.CATEGORY_STATUS);
builder.setSmallIcon(R.drawable.ic_notification);
Bitmap largeIcon = BitmapFactory.decodeResource(ctx.getResources(), R.mipmap.blueowl);