Am currently implementing a photo-editing app with the Html5 canvas in phonegap for android.I would love to use the phonegap screenshot plugin found here : https://github.com/phonegap/phonegap-plugins/tree/master/Android/Screenshot to save the content of the canvas as a .png on the SD card of the device. I tried implementing it with the following code.
<script type="text/javascript" src="cordova-2.2.0.js"></script>
<script type="text/javascript" src="Screenshot.js"></script>
<script>
document.addEventListener("deviceready",onDeviceReady,false);
// Cordova is ready to be used!
//
function onDeviceReady() {
$('#13zoom').click(function(){
window.plugins.Screenshot.saveScreenshot();
});
}
</script>
But am getting the screenshot of the whole page and not the content of the html5 canvas.
Besides the Data to url() function is broken in android 3x and below so that's why I have resorted to the screenshot plugin to save the content of the canvas.