I'm tried to run
this example with target = SDK 34 and B4A 13, but I get this error message:
keeprunningservice$ResumableSub_Startresume (java line: 197)
java.lang.SecurityException: Starting FGS with type camera callerApp=ProcessRecord{3cdb7e 13380:b4a.example.cameraintent/u0a191} targetSDK=34 requires permissions: all of the permissions allOf=true [android.permission.FOREGROUND_SERVICE_CAMERA] any of the permissions allOf=false [android.permission.CAMERA, android.permission.SYSTEM_CAMERA] and the app must be in the eligible state/exemptions to access the foreground only permission
I put this lines in the manifest:
AddPermission(android.permission.FOREGROUND_SERVICE_CAMERA)
AddPermission(android.permission.CAMERA)
AddPermission(android.permission.SYSTEM_CAMERA)
SetServiceAttribute(KeepRunningService, android:foregroundServiceType, "camera")
What am I doing wrong?
Thanks in advance for any tip.