Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.4.0, 7.0.0
-
None
-
Android Devices having Nougat
-
Important
Description
When using v2.2.0 on Nougat Android version. This code works fine either i select image file or any other document, it returns file url as expected.
But after updating to v2.4.0 on Nougat Android version same code works only for images and it fails for any other document. It goes to error block with err mesage "Unable to retrieve path to picture!"
I have updated camera plugin version from 2.2.0 to 2.4.0 to fix the camera "android.os.FileUriExposedException" on Android Nougat 7.0. Camera started working fine for taking pictures, but it is now failing to choose document from device.
var options = {
quality: 100,
destinationType: Camera.DestinationType.FILE_URI,
sourceType: Camera.PictureSourceType.PHOTOLIBRARY,
encodingType: Camera.EncodingType.JPEG
};
$cordovaCamera.getPicture(options).then(
function(fileURI)
{ console.log(fileURI); }, function(err)
{ console.log(err); });