I'm fairly new to Phonegap and Java and trying to save an png to the sdcard. I've been following this post and all steps taken there: Phonegap Plugin:How to convert Base64 String to a PNG image in Android
When I call the saveImage method I only get the alert with: "Invalid action" and I'm not sure why, anyone who has more experience with this particular plugin?
The js code that calls the plugin method:
function onDeviceReady(){
var myCanvas = getCanvas();
var myBase64 = myCanvas.toDataURL("image/png");
//console.log(myBase64);
//Shows how to use optional parameters
window.plugins.base64ToPNG.saveImage(myBase64, {filename:"inbjudan.png", overwrite: true},
function(result) {
alert(result);
}, function(error) {
alert(error);
});
}