Filetransfer.download not working properly in some mobiles

227 Views Asked by At

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

1

There are 1 best solutions below

1
jyoti sudyal On BEST ANSWER

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