Input type="file" accept="image/*;capture=camera" not working inside iframe inside ionic blank page

Hi All,

I know that it’s not the best way to do stuff in ionic, but using it for my purposes. I’ve to open our website inside an iframe in ionic view - blank app. (our quickhack to get app immediately)

We have a website on which there is a HTML5 control, which is a file upload
<input type="file" accept="image/*;capture=camera">

This perfectly asks me to open whether Camera or File browser, however, when I put this in ionic blank app with iframe and open the same page inside - it just opens file browser directly without asking for Camera.

I’ve added
<uses-permission android:name="android.permission.RECORD_AUDIO" /> <uses-permission android:name="android.permission.CAMERA" />
in AndroidManifest.xml and it’s still not working.

Can someone please help in this regard. Thanks in advance

1 Like

I had the same problem with my app. The reason it’s not working is that many devices use the dated native Android browser, which does not support camera capture.

The good news is that you can install Crosswalk so that your Ionic app uses the latest version of Chrome instead:

ionic browser add crosswalk

That fixed the issue for me