Cross Device Photo Capture For Upload
Since iOS6 Mobile Safari browser users of the have been able to upload images from their device either through the camera or their photo album. Web developers only had to write a u
Solution 1:
According to this chart, HTML Media Capture
is available on the following mobile platforms:
iOS Safari: 6.0 and greater
Android Browser: 3.0 and greater
Google Chrome: 4.0 and greater
BlackBerry Browser: BB10
Opera Mobile (Android & Symbian): 14.0 and greater
Firefox (Android, MeeGo): 11.0 and greater
It does not appear to be supported in Internet Explorer on Windows Phone. You can test on different devices here.
Solution 2:
Using PhoneGap:
<scripttype="text/javascript"charset="utf-8"src="phonegap-1.1.0.js"></script><script>functiontakePicture() {
navigator.camera.getPicture(
function (uri) {
var img = document.getElementById('camera_image');
img.style.visibility = "visible";
img.style.display = "block";
img.src = uri;
document.getElementById('camera_status').innerHTML = "Success";
},
function(e) {
console.log("Error getting picture: " + e);
document.getElementById('camera_status').innerHTML = "Error getting picture.";
},
{ quality: 50, destinationType: navigator.camera.DestinationType.FILE_URI});
};
</script><inputtype="button"onclick="takePicture();"value="Take Picture" /><br/>
Post a Comment for "Cross Device Photo Capture For Upload"