I have an application which takes a photo by launching the activity from background whenever the user sends the message(FCM)
In most of the devices, it works perfectly but in oppo phones I am getting below error when phone screen is locked otherwise it is working fine.
E/CheckPermission: real_camera-code= 9
OppoPermissionInterceptPolicy: Reject background permission android.permission.CAMERApkgName: Packagename
W/ServiceManager: Permission failure: android.permission.CAMERA_TAKEPICTURE from uid=10681 pid=7165
E/CheckPermission: Permission Denial: can't use real_camera takePicture
How can I prevent this issue? I want to take a photo even if the phone is locked
Note: Every camera permission is set, app is working fine in all phones other than OPPO