This is a migrated thread and some comments may be shown as answers.

getPicture failed Android

1 Answer 36 Views
Apache Cordova
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Nicolas
Top achievements
Rank 1
Nicolas asked on 05 Jan 2016, 05:12 PM

I am using the plugin camera in my application Ionic 1.2.0. What I do with the pictures he took with the camera I go to my server. I also wanted to select an image from the library.
I'm having problems with retrieving an image of the gallery on the device. I get the URL for me it is not valid, I can not raise.

 This code use to rescue the image :

 

    $scope.getPicture = function(){
    var options = {
      quality: 75,
      destinationType: Camera.DestinationType.FILE_URI,
      sourceType : Camera.PictureSourceType.PHOTOLIBRARY,
      encodingType: Camera.EncodingType.JPEG,
      popoverOptions: CameraPopoverOptions,
      correctOrientation: true,
      targetWidth: 720
    };

    Camera.getPicture(options).then(function(imageURI) {
      console.log(imageURI);
      $scope.photo = imageURI;
      $scope.nueva_foto = imageURI;
      $scope.mostrar_form = true;

    }, function(err) {
       console.log("error al seleccionar imagen "+err);
    });
  };

 The URL of the image I get is: image%3A43

 

1 Answer, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 08 Jan 2016, 12:41 PM
Hello Nicolas,

If you're using AppBuilder to develop a hybrid app, then you can try to replicate the issue in the Camera sample. If you can reproduce it there, please list the steps we can follow to replicate it as well on our side or attach the modified version in a support ticket.

We can then investigate the reported behavior in more details.

Regards,
Tina Stancheva
Telerik
 

Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

 
Tags
Apache Cordova
Asked by
Nicolas
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Share this question
or