Set foreground service behavior

This commit is contained in:
M66B
2023-11-12 07:52:29 +01:00
parent fb12509d8c
commit f688212fdd
3 changed files with 3 additions and 0 deletions

View File

@@ -231,6 +231,7 @@ public class ServiceSend extends ServiceBase implements SharedPreferences.OnShar
private Notification getNotificationService(boolean alert) {
NotificationCompat.Builder builder =
new NotificationCompat.Builder(this, "send")
.setForegroundServiceBehavior(Notification.FOREGROUND_SERVICE_IMMEDIATE)
.setSmallIcon(R.drawable.baseline_send_white_24)
.setContentTitle(getString(R.string.title_notification_sending))
.setContentIntent(getPendingIntent(this))