diff --git a/common/src/main/AndroidManifest.xml b/common/src/main/AndroidManifest.xml
index 9897cf2ce..dbe8c6778 100644
--- a/common/src/main/AndroidManifest.xml
+++ b/common/src/main/AndroidManifest.xml
@@ -45,8 +45,13 @@
-
-
+
+
diff --git a/common/src/main/java/com/liskovsoft/smartyoutubetv2/common/misc/RemoteControlReceiver.java b/common/src/main/java/com/liskovsoft/smartyoutubetv2/common/misc/RemoteControlReceiver.java
index 3a349dc0e..46d63e098 100644
--- a/common/src/main/java/com/liskovsoft/smartyoutubetv2/common/misc/RemoteControlReceiver.java
+++ b/common/src/main/java/com/liskovsoft/smartyoutubetv2/common/misc/RemoteControlReceiver.java
@@ -3,6 +3,8 @@ package com.liskovsoft.smartyoutubetv2.common.misc;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
+import android.os.Build.VERSION;
+
import com.liskovsoft.sharedutils.mylogger.Log;
import com.liskovsoft.smartyoutubetv2.common.utils.Utils;
@@ -11,10 +13,13 @@ public class RemoteControlReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
- Log.d(TAG, "Initializing remote control listener...");
+ // Starting from Android 12 foreground service not supported
+ if (VERSION.SDK_INT < 31) {
+ Log.d(TAG, "Initializing remote control listener...");
- // Fix unload from the memory on some devices?
- Utils.updateRemoteControlService(context);
+ // Fix unload from the memory on some devices?
+ Utils.updateRemoteControlService(context);
+ }
//Utils.startRemoteControlWorkRequest(context);