moustafawhb opened a new issue #563: Camera Cordova plugin issue on android
URL: https://github.com/apache/cordova-plugin-camera/issues/563
 
 
   My application uses ionic 1 and 
[cordova-camera-plugin](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-camera).
 It is working fine on ios. However on android the first time it asks for 
camera permission and then app crashes, then when I try again I get the 
following error: 
file:///storage/emulated/0/Android/data/com.company.test/cache/.Pic.jpg exposed 
beyond app through ClipData.Item.getUri()
   
   I appriciate any help.. Please find my code below:
   
   document.addEventListener("deviceready", onDeviceReady, false);
   function onDeviceReady() {
       var cameraOptions = {
               quality: 100,
               targetWidth: 400,
               targetHeight: 400,
               destinationType: Camera.DestinationType.DATA_URL,
               correctOrientation: true
       };
          navigator.camera.getPicture(cameraSuccess, cameraError, 
cameraOptions);
   
   }
   
    function cameraSuccess(imageURI){
        $scope.$apply(function () {
           //some code
        });
    }
   
    //here is where i am getting the error 
    function cameraError(message)
    {
       console.log(message);
      //alert('Failed because: ' + message);
    }

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to