Make persistent notification not peak on every update on Oreo.

This commit is contained in:
Johannes Mockenhaupt 2018-05-01 14:59:40 +02:00
parent 73d7d98354
commit 4d1515769f
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1

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);