Callback does not call some time when using $cordovaCamera to get picture


#1

When i use $cordovaCamera to get picture from gallery or take a take a picture using camera so callback method does not call immediately…some time it never call or when i click again to select a picture from gallery then only previous call back calls.

Is any thing i am missing here…
DEVICE S4 4.4.2 ANDROID

$scope.takePictureaaa = function() {
    var options = { 
        quality : 75, 
        destinationType : Camera.DestinationType.FILE_URL, 
        sourceType : Camera.PictureSourceType.CAMERA,  
        allowEdit : true,
        encodingType: Camera.EncodingType.JPEG,
        targetWidth: 100,
        targetHeight: 100,
        popoverOptions: CameraPopoverOptions,
        saveToPhotoAlbum: false
    };

    $cordovaCamera.getPicture(options).then(function(imageData) {
         alert(imageData);
      // Success! Image data is here
    }, function(err) {
      // An error occured. Show a message to the user
    });.

#2

hey there,

i got this behavior in an old file-plugin of cordova.
With a newer one it seems to be fixed.

Only recognized this on Samsungs crappy tablets with Android 4.4.2

Try to update our file-plugin.

Greetz, bengtler


#3

i am using all latest plugins but still same issue.
is thw issue with ngCordova js wrapper file


#4

Oh okay, maybe it was not the current version, but an older one.

I can not recognize. But i knew that issue.
Maybe you can try an older version of the plugin.

I got this error if i want to record an audio file and upload it afterwards with a click on a button.
On the 4.4.2 samsung tablets the upload button does not trigger the upload, because the getFile method does not get in success or error callback. I have to tap another time on “record audio” - after that it started the upload^^.

Greetz, bengtler