-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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 android file input with capture attribute. #808
Comments
We are having the same issues, with or without the capture attribute. It works in Chrome, but not in IAP. |
I've gone the distance and made the change myself. Didn't have the time to wait, so I removed the file manager and replaced with camera instead. |
Hi, could you elaborate a bit more on what you did, and how? That would be great! |
I can try. I actually took some of the code from the cordova-plugin-camera plugin and updated In the end, I just removed the file manager code out and inserted the new logic. Later on I would love to update it, so both options is possible and maybe make a pull request |
Thank you very much! 👍 I'm afraid we'll have to resort to something like this, too, if it doesn't get fixed by the team. |
Do you just need the camera or do you want both options and make the user choose between camera and file manager? |
We would need both options, ideally exactly like in a standard browser. Video recording must also be possible. |
…apture attribute relates apache#808 apache#328
Thanks for putting this code in it is great I have been trying it. Have noticed when cancelling without choosing a file or taking a photo it crashes the app or stops future files from working. OnActivityResult I put in a check for intent != null on file chooser and made sure the callback was called for the camera even if there was no result to fix this. Also I needed to put this meta data in for camera to work if anyone else is trying to implement it https://stackoverflow.com/questions/56598480/couldnt-find-meta-data-for-provider-with-authority |
Bug Report
Problem
When I click an file input, it should make me able to use camera as a input.
What is expected to happen?
When I click the file input with capture= attribute, it should open camera.
What does actually happen?
It opens file manager instead.
Information
Just have a normal file input where you can add capture attribute.
It should then open camera up for the user, but it always open the file manager.
This problem only occurs on Android though, iOS works fine.
Environment, Platform, Device
Android
Version information
Cordova: Cordova CLI 10.0.0.
cordova-android "^9.0.0",
cordova-ios "^5.1.1",
cordova-plugin-camera "^4.1.0",
cordova-plugin-device "^1.1.7",
cordova-plugin-file-transfer "^1.7.1",
cordova-plugin-inappbrowser "^4.0.0",
cordova-plugin-migrate-localstorage "0.0.2",
cordova-plugin-wkwebview-engine "^1.2.1",
cordova-plugin-wkwebview-file-xhr "^2.1.4",
The text was updated successfully, but these errors were encountered: