Why can't I download files created with createObjectUrl in an Android app with a webview. It's also not possible with the default browser (Samsung Galaxy S6 Edge). I get the message (in Swedish) "Endast http- eller https-URL:er kan hämtas.", translation: only http or https URLs can be fetched.
HTML
<textarea id="editor">Hello, world!</textarea>
<a download="myFile.txt" id="fileSaver">Save as...</a>
Javascript
function updateLink() {
var editor = document.getElementById("editor"),
fileSaver = document.getElementById("fileSaver"),
blob = new Blob([editor.value], { type: "text/plain" });
fileSaver.href = (window.URL || window.webkitURL).createObjectURL(blob);
}
updateLink();
fileSaver.onclick = fileSaver.oncontextmenu = updateLink;
JSFiddle: http://jsfiddle.net/no3cLwpv/1/