Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-12225

Cordova camera always returns same picture in Android

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • None
    • None
    • cordova-plugin-camera
    • None
    • Android

    Description

      If I select images from SAVEDPHOTOALBUM, it always returns same image
      file:///storage/emulated/0/android/data/app/cache/.pic.jpg

      my code looks like following

          var selectAPhoto = function(){
                var options = {
                  quality: 80,
                  destinationType: Camera.DestinationType.FILE_URI,
                  sourceType: Camera.PictureSourceType.SAVEDPHOTOALBUM,
                  allowEdit: true,
                  encodingType: Camera.EncodingType.JPEG
                }
          
                $cordovaCamera.getPicture(options).then(function(imageData) {
                  $scope.photos[emptySlot($scope.photos)].source = imageData;
                  $scope.photos[emptySlot($scope.photos)].stockImage = false;
                  update();
                }, function(err) {
          
                });
              }
      

      There is a workaround on following link but I'm quite sure that using DATA_URL causes a memory issue at some stage
      http://stackoverflow.com/questions/27540710/cordova-camera-plugin-always-return-the-same-image-when-select-from-gallery-with#_=_

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mkim871 Nicholas Kim
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: