From 26fbbc36e5df4ceca2ad80fccbdcd9e9771d21b2 Mon Sep 17 00:00:00 2001 From: Mygod Date: Thu, 8 Jun 2023 19:49:48 -0400 Subject: [PATCH] Add support for foreground service permission --- mobile/src/main/AndroidManifest.xml | 7 +++++-- .../main/java/be/mygod/vpnhotspot/ServiceNotification.kt | 7 ++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/mobile/src/main/AndroidManifest.xml b/mobile/src/main/AndroidManifest.xml index 980ab420..3a2ef675 100644 --- a/mobile/src/main/AndroidManifest.xml +++ b/mobile/src/main/AndroidManifest.xml @@ -32,6 +32,7 @@ + @@ -102,11 +103,13 @@ + android:foregroundServiceType="location|connectedDevice" + tools:ignore="ForegroundServicePermission"/> + android:foregroundServiceType="location|connectedDevice" + tools:ignore="ForegroundServicePermission"/> = 33) { + service.startForeground(NOTIFICATION_ID, buildNotification(service), + ServiceInfo.FOREGROUND_SERVICE_TYPE_CONNECTED_DEVICE) + } else service.startForeground(NOTIFICATION_ID, buildNotification(service)) } } fun stopForeground(service: Service) = synchronized(this) {