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

navigator.device.capture.captureImage() returns error each time

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 3.6.3
    • None
    • cordova-android
    • Galaxy S5
      Android 4.4.4
      Cordova 3.6.3
      org.apache.cordova.media-capture 0.3.3
      org.apache.cordova.file 1.3.1

    Description

      The following test code is producing an error message as soon as the Android camera app closes after the "OK" button is clicked to accept the image. This is on Android 4.4.4, Cordova 3.6.3, Galaxy S5. There are no prior albums/pictures on the phone. I tried many different versions of the media-capture and file plugins. The "Retry" button and back button work as expected.

      HTML:

      <button type="button" onclick="takePicture();">Take Pictures</button>
      

      JavaScript:

      takePicture = function() {
      	navigator.device.capture.captureImage(function(mediaFiles) {
      		alert("Pictures captured!");
      	}, function(err) {
      		alert("Err: " + err.message + "\n\nCode: " + err.code);
      	}, {limit : 100});
      };
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              lifz Chris Haley
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: