I wrote an application to access USB camera and it works fine in Android 9, but it failed in Android 10. I know that start from Android 9, application needs to grant permission from user on accessing camera as well as USB device in order to access USB camera. I found that in Android 10, application can grant permission in accessing camera, but when try to ask permission to access USB camera by UsbManager.requestPermission(), application received “deny” immediately without any prompt to ask user. Is there any other permissions I needed to ask in Android 10?
You can try to change the targetversion to 27, but this is not a good solution. Targetversion will be judged before checking permissions,
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With