diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 13d6420e..d8a02fb8 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -46,8 +46,7 @@ - - + = Build.VERSION_CODES.Q) { + startForeground(FOREGROUND_NOTIFICATION_ID, createForegroundNotification(), ServiceInfo.FOREGROUND_SERVICE_TYPE_CONNECTED_DEVICE); + } else { + startForeground(FOREGROUND_NOTIFICATION_ID, createForegroundNotification()); + } } return Service.START_STICKY; }