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

Media-Capture plugin on Android returns Canceled error when Accept image is selected

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Duplicate
    • Affects Version/s: 3.5.0
    • Fix Version/s: None
    • Labels:
      None
    • Environment:

      Android 2.3.x,4.0.x, 4.1, 4.2, 4.3, 4.4
      Cordova 3.5.0-0.2.4

      Plugins:
      org.apache.cordova.file 1.2.0 "File"
      org.apache.cordova.media-capture 0.3.1 "Capture"

      Description

      Attempting to run the following:

      navigator.device.capture.captureImage(function(mediaFiles) { alert('success?');  },
      function(error)
      {
        navigator.notification.alert('Error code: ' + error.code + ' = ' + error.message, null, 'Capture Error');
       },{ limit:1 });
      

      always invokes the error callback with the object:

      {"message":"Canceled.", "code":3}
      

      even if the accept image option is selected.

      Android 4.4 behaves differently, where tapping on the accept image option does nothing and instead of returning with the error, it remains on the captured photo view.

        Attachments

        1. index.js
          3 kB
          James White

          Issue Links

            Activity

              People

              • Assignee:
                agrieve Andrew Grieve
                Reporter:
                jamespwhite James White
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: