getPicture failed Android

Thread is closed for posting
2 posts, 0 answers
  1. Nicolas
    Nicolas avatar
    1 posts
    Member since:
    Jan 2016

    Posted 05 Jan 2016 Link to this post

    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) {
          $ = 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


  2. Tina Stancheva
    Tina Stancheva avatar
    3299 posts

    Posted 08 Jan 2016 Link to this post

    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.

    Tina Stancheva

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

Back to Top