Camera won't open on Android or iOS


#1

I’m trying to build an actionsheet that allows the user to choose an image from their library or by taking one with the camera. The library options works great (Camera.PictureSourceType.PHOTOLIBRARY). I can’t seem to get the camera to open on Android 7.0+ or iOS 10 using Camera.PictureSourceType.CAMERA.

I have tested on an older Android 6.0 device and everything works perfect.

My code is pretty basic since I was just trying to get something simple working. Minus the PHP stuff, I followed this tutorial as well https://devdactic.com/ionic-image-upload-php/

Is there something I’m missing here?


#3

I think I’ve tracked it down to an Android N security feature (http://stackoverflow.com/questions/32623304/when-take-photo-get-java-lang-throwable-file-uri-exposed-through-clipdata) but I have no idea what needs to change to get around this, or if it’s even possible.

Changed my target SDK to 23 and it works fine.

Is this the only option right now?