You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Mayank Kumar (JIRA)" <ji...@apache.org> on 2017/04/23 11:37:04 UTC

[jira] [Updated] (CB-12689) Camera chooser not returning selected FILE_URI from native explorer when pdf or any other document selected except images.

     [ https://issues.apache.org/jira/browse/CB-12689?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mayank Kumar updated CB-12689:
------------------------------
    Labels: android camera cordova nougat  (was: )

> Camera chooser not returning selected FILE_URI from native explorer when pdf or any other document selected except images.
> --------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CB-12689
>                 URL: https://issues.apache.org/jira/browse/CB-12689
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin Camera
>    Affects Versions: 2.4.0, 7.0.0
>         Environment: Android Devices having Nougat
>            Reporter: Mayank Kumar
>              Labels: android, camera, cordova, nougat
>
> 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);
> 	}
> );



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org