Search code examples
androidcordovahybrid-mobile-appmonacamulti-device-hybrid-apps

Filetransfer.download not working properly in some mobiles


Given below is my code (form is the name of the file i want to download)

var fileURI = "http://myurl/"+form;           
window.requestFileSystem(LocalFileSystem.PERSISTENT,0,function(fs){            
    var filepath = fs.root.fullPath + "storage/emulated/0/Download/" + Form; 
    alert(filepath);
    var ft = new FileTransfer();
    ft.download(fileURI, filepath, function(entry){
        alert(entry.fullPath);
    }, function() {
        alert("error");
    });

});

amazingly the code is working fine on my android mobile phone, but the same is not true for other android devices that are using this application. I am dumbstruck at the moment, any type of help will be amazing presently. TIA


Solution

  • window.open('url', '_system');