• Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.3.0
    • Fix Version/s: None
    • Component/s: Android
    • Environment:

      Phonegap Sample App

      Droid 3 with current updates (Android 2.3.4)

      Native (for droid 3) camera app.


      1. In the sample app, click the button to take a picture.
      2. The camera app launches, take a picture, and tap done.
      3. The sample app reappears but there is no indication that the picture was taken.

      I made a simple app to test this, which should simply alert the FILE_URI result, or alert something on error. Neither callbacks are hit, instead the app restarts. If you view the logcat, it shows a console.log() right before launching the camera, and the next log message after taking the picture shows a new PID and other logs related to the app starting.

      This happens in any app I have tried this with, even the simplest "take a picture and alert the path" app. It also happens with alternative camera apps. I've tried a couple of 3rd party camera apps with the same outcome.

      This might be related - They describe the exact behavior I see, but I tried using their modified phonegap.jar with no luck.

      <!DOCTYPE html>
          <title>Capture Image</title>
      	<script src=""></script>
          <script type="text/javascript" charset="utf-8" src="phonegap-1.3.0.js"></script>
          <script type="text/javascript" charset="utf-8">
          var defaultPictureOptions = {
          		quality : 50,
          		destinationType: Camera.DestinationType.FILE_URI,
          		sourceType: Camera.PictureSourceType.CAMERA
          		/* ,
          		targetWidth: 100,
          		targetHeight: 100
          	var phonegapPic = function(onSuccess, onFail, photoType) {
          		if (!navigator) { console.log('no navigator obj'); return false; }
          		if (! { console.log('no obj'); return false;  }
          		if (! { console.log('no'); return false; }
          		photoType = photoType || "camera";
          		console.log('taking picture...');
          		var opts = $.extend({}, defaultPictureOptions, {
          			sourceType: (photoType === "camera") ? Camera.PictureSourceType.CAMERA : Camera.PictureSourceType.PHOTOLIBRARY
  , onFail, opts);
          		return true;
          	function captureImage()
          		phonegapPic( function( imgURI ){ alert( 'got picture: ' + imgURI ); },
          				function(){ alert( 'error!' )} );
              <button onclick="captureImage();">Capture Image</button> <br>


        No work has yet been logged on this issue.


          • Assignee:
            John Reeves
          • Votes:
            1 Vote for this issue
            2 Start watching this issue


            • Created: