My computer code was working fine in WL 5.0.6 and the mobile browser simulator will display the image correctly. Now I went to WL 6.0 and I get an error while using preview in the mobile browser simulator and using Cordova Camera Simulation to get fake pictures.
I am using Chrome for preview.
Local resources are not allowed to load: file: /// C: /Users/Administrator/cordova/internal/sim/camera/camera1_m.jpg wljq.js: 2374 < P> The code is similar tonavigator.camera.getPicture (onSuccess, onFail, {: 50, destinationType: quality Camera.DestinationType.FILE_URI});Note that if I use DATA_URL, then it looks fine with the mobile browser simulator just does not work with FILE_URI Mobile Browser Simulator.
Warkelight 6.0 supports mobile browser simulator Cordova 2.6 API. Navigator.camera.getPicture can be used in the following destination type WL 6.0:
Return to the base 64 encoded string FILE_URI image as Camera.DestinationType = {DATA_URL: 0, // 1, // image file return URI NATIVE_URI: 2 // image Return native URI (such as asset-Library: // iOS or content: // on Android)};example:
navigator.camera.getPicture (function) {document.getElementById ('camera_status') innerHTML = "Success: Picture located document ;: "getting var img = document.getElementById ( 'camera_image'); img.style.display = + data" none ";}, function (e) (" "+ e error picture {console.log ). getElementById ( 'camera_status') innerHTML =;} {quality. "getting error picture.": 50, destinationType: navigator.camera.DestinationType.FILE_URI, sourceType: navigator.camera.PictureSourceType.SAVEDPHOTOALBUM, encodingType: filetype}) ;Try clearing your browser cache and then be sure to accept the applet permission dialog on the mobile browser simulator startup. It also ensures that will allow you to move your file permissions C: / Users // Cordowa / internal / SIM / camera / folder because there applet stored camera SIM image content.
Cordova 2.6 Camera API Reference:
No comments:
Post a Comment