Android does not allow native apps like Phonegap-based apps to write binary files. A common application is converting Base64 Strings to Images. So, how do you go about this
Fo anybody wanting to use this with kineticjs, the following works a treat:
function saveCanvas() {
$('#save').bind( $bind, function(){
stage.toDataURL({
callback: function(dataUrl){
window.plugins.base64ToPNG.saveImage(dataUrl.substr(22,dataUrl.length), {},
function(result) {
alert(result);
}, function(error) {
alert(error);
}
);
},
mimeType: 'image/png',
quality: 0.5
});
});
}