Start NotificationService as a foreground service

This should prevent the notification from remaining after the app has
been killed by Android.

Fixes #1037.
pull/1039/head
Alexander Bakker 3 years ago
parent f8d89d5754
commit ef759eb15e

@ -47,8 +47,7 @@ public class NotificationService extends Service {
.setOngoing(true) .setOngoing(true)
.setContentIntent(pendingIntent); .setContentIntent(pendingIntent);
NotificationManagerCompat notificationManager = NotificationManagerCompat.from(this); startForeground(NOTIFICATION_VAULT_UNLOCKED, builder.build());
notificationManager.notify(NOTIFICATION_VAULT_UNLOCKED, builder.build());
} }
@Override @Override

Loading…
Cancel
Save