1

How is it possible to make a "take a picture" button using html 5 ? I know that by adding an

<input type="file" /> 

Android devices will ask the user to choose a source ... One of the sources is the camera.

however in iphone devices it will open the gallery to choose a picture the user wants to upload.

is it possible to create a button that will open the camera on both devices? (what about windows phones ?)

I am looking for a solution that can utilize any html-mobile framework i.e. phonegap, cordova etc...

Mortalus
  • 10,574
  • 11
  • 67
  • 117

1 Answers1

0

Don't think so. But this format looks good for taking picture form.

html

<h4>Take a Picture</h4>
<form id="form1" name="form1" enctype="multipart/form-data">
       <input type="file" id="file1"  name="file1" accept="image/*" capture="camera">
       <input type="file" id="file2"  name="file2" accept="image/*" capture="camera">
       <input type="button" value="Save" onclick="sendFile();" />
</form>

IOS

enter image description here

Community
  • 1
  • 1
user3023313
  • 124
  • 11