Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>The Worklight 6.0 Mobile Browser Simulator supports Cordova 2.6 APIs. For navigator.camera.getPicture the following destination types can be used in WL 6.0:</p> <pre><code>Camera.DestinationType = { DATA_URL : 0, // Return image as base64 encoded string FILE_URI : 1, // Return image file URI NATIVE_URI : 2 // Return image native URI (eg. assets-library:// on iOS or content:// on Android) }; </code></pre> <p>Example:</p> <pre><code>navigator.camera.getPicture( function(data) { document.getElementById('camera_status').innerHTML = "Success: picture located at " + data; var img = document.getElementById('camera_image'); img.style.display = "none"; }, function(e) { console.log("Error getting picture: " + e); document.getElementById('camera_status').innerHTML = "Error getting picture."; }, { quality: 50, destinationType: navigator.camera.DestinationType.FILE_URI, sourceType: navigator.camera.PictureSourceType.SAVEDPHOTOALBUM, encodingType: fileType}); </code></pre> <p>Try clearing your browser cache and then be sure to accept the applet permission dialogue on Mobile Browser Simulator startup. Also make sure that your file permissions will allow transfer from the C:/Users//cordova/internal/sim/camera/ folder as that is where the applet stores the camera sim image content. </p> <p>Cordova 2.6 Camera API reference: <a href="http://docs.phonegap.com/en/2.6.0/cordova_camera_camera.md.html" rel="nofollow">http://docs.phonegap.com/en/2.6.0/cordova_camera_camera.md.html</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload