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

Shazron Abdullah updated CB-12225:
----------------------------------
    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    
{code}
    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) {
    
          });
        }
{code}

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#_=_

  was:
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#_=_


> Cordova camera always returns same picture in Android
> -----------------------------------------------------
>
>                 Key: CB-12225
>                 URL: https://issues.apache.org/jira/browse/CB-12225
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin Camera
>         Environment: Android
>            Reporter: Nicholas Kim
>
> 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    
> {code}
>     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) {
>     
>           });
>         }
> {code}
> 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#_=_



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

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

Reply via email to