you need the permission + the foreground service type + google's approval when submitting to play
B4X:
AddPermission(android.permission.FOREGROUND_SERVICE_CAMERA)
SetServiceAttribute(service_name, android:foregroundServiceType, "camera")
plus you should probably add:
<uses-feature android:name="android.hardware.camera" android:required="true" />
<uses-feature android:name="android.hardware.camera.autofocus" android:required="true" />
plus be ready in case google complains about leaving the camera on all the time, constantly focussing and searching for qr codes
Last edited: Oct 13, 2024
"A little kindness - as little as required by applicable law."
"It can't hurt to read the thread before replying."
"Show code; code always does what you tell it to do, not always what you tell us it does."