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)
.setContentIntent(pendingIntent);
NotificationManagerCompat notificationManager = NotificationManagerCompat.from(this);
notificationManager.notify(NOTIFICATION_VAULT_UNLOCKED, builder.build());
startForeground(NOTIFICATION_VAULT_UNLOCKED, builder.build());
}
@Override

Loading…
Cancel
Save