S
S
SirD2013-03-19 14:23:19
Android
SirD, 2013-03-19 14:23:19

How to turn on its camera when clicking on the “file” field on the site from the phone, and not show the file manager?

The task is when you enter the site from a smartphone on android (via opera mini), it is possible to upload an image.
The form is normal, which has input type="file".
Is it possible to let the user choose where to take images from (from the camera, or from the smartphone's memory), like in the instagram application.
Is it possible to implement this on a website (maybe some html5...), or is it only possible in applications?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
SirD, 2013-03-19
@SirD

Here is what I found on StackOverflow:
Here is the code to get access to the new camera api's in android 3+ and iOS 6.
<input type="file" accept="image/*" capture="camera">
This will allow you to take a new picture or select one from the device library and then upload it to a web app .
I'll get to a phone with an android above version 3 in a couple of hours.
Doesn't work on 2.1.

G
GavriKos, 2013-03-19
@GavriKos

Only the option with appscheme came to mind, if the camera has one. As a last resort, intercept the scheme by the application and then throw it on the camera.

J
jenka1, 2019-03-25
@jenka1

On Android 5 it worked, but on iOS the camera turned on, but only a black screen and camera settings were shown. The image itself was not and when you clicked on the "photograph" button, nothing happened.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question