The foreground service does not work in Android14. It gives below error. When we call the method start recording.
java.lang.RuntimeException: Unable to start service com.foregroundservice.ForegroundService@fa42443 with Intent { cmp=com.stratbeans.bytecastingevolve/com.foregroundservice.ForegroundService (has extras) }: java.lang.SecurityException: Starting FGS with type mediaProjection callerApp=ProcessRecord{1d2d69b 3953:com.stratbeans.bytecastingevolve/u0a200} 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]
The foreground service does not work in Android14. It gives below error. When we call the method start recording.
java.lang.RuntimeException: Unable to start service com.foregroundservice.ForegroundService@fa42443 with Intent { cmp=com.stratbeans.bytecastingevolve/com.foregroundservice.ForegroundService (has extras) }: java.lang.SecurityException: Starting FGS with type mediaProjection callerApp=ProcessRecord{1d2d69b 3953:com.stratbeans.bytecastingevolve/u0a200} 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]