Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Camera does not open on Huawei device with Android 10 #189

Open
amanzan opened this issue Oct 8, 2020 · 3 comments
Open

Camera does not open on Huawei device with Android 10 #189

amanzan opened this issue Oct 8, 2020 · 3 comments

Comments

@amanzan
Copy link

amanzan commented Oct 8, 2020

Trying to upload a file and I see the intent chooser. Tap on the camera, but it does not open. I always get Activity.RESULT_CANCELLED in onActivityResult.

Using a Huawei Mate 20 with Android 10 installed.

PS: Had to modify the switch inside onShowFileChooser, because I was getting an empty String acceptType and camera wasn't even showing in the intent chooser

@amanzan
Copy link
Author

amanzan commented Oct 8, 2020

@mgks
Copy link
Owner

mgks commented Oct 11, 2020

this is a long going issue of webview since the beginning. If I fix this, some other device will stop supporting.

@amanzan
Copy link
Author

amanzan commented Oct 11, 2020

@mgks in the stackoverflow link I posted, you can find the solution. Also in this one: https://stackoverflow.com/questions/38200282/android-os-fileuriexposedexception-file-storage-emulated-0-test-txt-exposed
You need to use fileprovider. Only Huawei device needed this. I added it and it works, and it still works on a Xiaomi device. Can't guarantee it works on all brands, but it should

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants