flutter_background
flutter_background copied to clipboard
[BUG] Android 14 (API 34+): Foreground service types are required
https://developer.android.com/about/versions/14/changes/fgs-types-required https://developer.android.com/about/versions/14/changes/fgs-types-required#media-projection https://developer.android.com/reference/android/content/pm/ServiceInfo#FOREGROUND_SERVICE_TYPE_MEDIA_PROJECTION
E/AndroidRuntime(16537): java.lang.RuntimeException: Unable to start service de.julianassmann.flutter_background.IsolateHolderService@ceb8b4b with Intent { act=START cmp=com.remotelegal.astra/de.julianassmann.flutter_background.IsolateHolderService }: java.lang.SecurityException: Starting FGS with type mediaProjection callerApp=ProcessRecord{5ba1ad5 16537:com.remotelegal.astra/u0a549} targetSDK=34 requires permissions: all of the permissions allOf=true [android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION] any of the permissions allOf=false [android.permission.CAPTURE_VIDEO_OUTPUT, android:project_media]
E/AndroidRuntime(16537): at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:5053)
E/AndroidRuntime(16537): at android.app.ActivityThread.-$$Nest$mhandleServiceArgs(Unknown Source:0)
E/AndroidRuntime(16537): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2390)
E/AndroidRuntime(16537): at android.os.Handler.dispatchMessage(Handler.java:107)
E/AndroidRuntime(16537): at android.os.Looper.loopOnce(Looper.java:232)
E/AndroidRuntime(16537): at android.os.Looper.loop(Looper.java:317)
E/AndroidRuntime(16537): at android.app.ActivityThread.main(ActivityThread.java:8501)
E/AndroidRuntime(16537): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(16537): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
E/AndroidRuntime(16537): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)
E/AndroidRuntime(16537): Caused by: java.lang.SecurityException: Starting FGS with type mediaProjection callerApp=ProcessRecord{5ba1ad5 16537:com.remotelegal.astra/u0a549} targetSDK=34 requires permissions: all of the permissions allOf=true [android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION] any of the permissions allOf=false [android.permission.CAPTURE_VIDEO_OUTPUT, android:project_media]