Can I open android camera in webview?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The easiest way to have the camera functionality when using a Webview would be the use an Intent.
If you use the API you have to build a lot of the UI yourself. This is good or bad depending on what you need to do in your application and how much control you need over the “picture taking process”. If you just need a quick way to snap a photo and use it in your application, Intent is the way to go.
Intent Example:
I borrowed parts of this example from another answer to build this originally. But I don’t have the URL anymore.
In the app I am writing now, I convert this image to Base64 and then pass it to Javascript which then posts it to my server. But, that’s probably more than you needed to know. 🙂
here is the link to make it work on webView