This is what I'we tried:
<input id="capture" name="capture" type="file" accept="image/*" capture="camera">
<input id="capture" name="capture" type="file" accept="image/*" capture>
<input id="capture" name="capture" type="file" accept="image/*;capture=camera">
<input id="capture" name="capture" type="file" accept="image/*;capture=camera" capture>
This is the user agent string:
Mozilla/5.0+(Linux;+Android+5.1.1;+SM-J320FN+Build/LMY47V)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/53.0.2785.124+Mobile+Safari/537.36
The problem i'm facing is that for some reason this android device goes directly to camera (opens camera), without showing any options to choose a file from the gallery or take a picture by using camera.
Any suggestion how to overcome this?
This is a problem with android. You are doing everything right and it will work fine on computers. Android does not show an option to choose an image from gallery directly. When clicking the button to upload you can choose "Documents" from the option that pops up and when you slide from left to right you will see an option named gallery. By clicking on it you can select an image from the gallery. Unfortunately, I think this is the only way around. Hope this helped.
This is not your fault. Tested this on android 4.4, 5 and 6 and none of them worked for me, but in chrome only. Firefox gives me options.
Digging around, I found this issue in android 4.4>. It's an old thread, but nothing else make sense.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With