I have a web app that accesses the file chooser from a computer or camera from a device with a simple HTML input (there is also a callback to process the image but I'm leaving it out here for simplicity):
<input type='file' accept='image/*' capture>
I am trying to open this web page from an Ionic mobile app. Essentially all this app has is an iframe with a test page defined as the source.
<iframe src="//jsfiddle.net/esoyke/s62rd1yb/6/embedded/result/" allowfullscreen="allowfullscreen" allowpaymentrequest frameborder="0" width="100%" height="300"></iframe>
Except the file chooser comes up instead of the camera. I don't see any errors in my logcat when debugging, it just can't get camera access, only the file chooser. I also tried adding allow='camera' to the iframe tag, same result.
If I open this page from an iframe in another web page in a mobile browser, I can access the camera no problem.
I've seen similar questions out there, but most are about getting camera access through an iframe, which is working just fine for me. The Ionic app seems to be what introduces the problem.