2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-29 13:17:43 +00:00

Trying random things to try to fix ForegroundServiceStartNotAllowedException

This commit is contained in:
Albert Vaca Cintora 2023-07-08 00:24:17 +02:00
parent ea80000a4e
commit f54ebdb39b

View File

@ -206,6 +206,7 @@ public class BackgroundService extends Service {
.setContentIntent(pi)
.setPriority(NotificationCompat.PRIORITY_MIN) //MIN so it's not shown in the status bar before Oreo, on Oreo it will be bumped to LOW
.setShowWhen(false)
.setForegroundServiceBehavior(NotificationCompat.FOREGROUND_SERVICE_IMMEDIATE)
.setAutoCancel(false);
notification.setGroup("BackgroundService");