Camera.GetPicture throwing error after recent update (Galaxy S7)

Hi There,

Anyone experiencing with Camera not longer working after recent Android update for Galaxy S7.

Error message:

file ///storage/emulated/0/Android/data/com.ionic.viewapp/cache/.Pic.jpg exposed beyond app through ClipData.Item.getUri()

Sample Code:

this.camera.getPicture({
  quality: 100,
  destinationType: this.camera.DestinationType.DATA_URL,
  encodingType: this.camera.EncodingType.PNG,
  mediaType: this.camera.MediaType.PICTURE,
  sourceType: this.camera.PictureSourceType.CAMERA
}).then(imageData => {
  this.myPhotoURL = "data:image/jpeg;base64," + imageData;
}, error => {
  console.log("ERROR -> " + JSON.stringify(error));
  this.myPhotoStatus = "ERROR -> " + JSON.stringify(error);
});

Additional Info

Cordova CLI: 6.5.0
Ionic Framework Version: 2.3.0
Ionic CLI Version: 2.2.2
Ionic App Lib Version: 2.2.1
Ionic App Scripts Version: 1.2.2
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 7
Node Version: v6.7.0
Xcode version: Not installed

Any pointer?

Thanks,
d

Its issue with new android 7 nougat update as Android 7 doesn’t allow to access file via file:// for security reasons. I am also facing same issue.
here is link to understand issue : https://inthecheesefactory.com/blog/how-to-share-access-to-file-with-fileprovider-on-android-nougat/en

here is link for solution : https://developer.android.com/reference/android/support/v4/content/FileProvider.html

I have no idea about android and java programming. Please let me know if you get it fixed.