Download by javascript does not work on intel xdk

Asked

Viewed 34 times

1

I have a script that works normally in the mobile browser and the computer browser, but when I get an apk it saves a file with another extension instead of the proposal.

Follow below my script

$("#download").click(function() {
		html2canvas($("#layout"), {
		  onrendered: function(canvas) {
			var a = document.createElement('a');
			a.href = canvas.toDataURL("image/jpeg", 1.0);
			a.download = 'sou-enfermagem.jpeg';
			a.click();
		  }
		});
	});

I just need this image to be saved in the download folder of android. What I need to change in this script to work on android?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.