0

I wonder how can I download files through a url, using enyo with phonegap?

Already tried to use the phonegap plugins download, but no success. I tried to use the palmService, but did not find reference to how to insert it in the project.

I used this plugin: https://github.com/phonegap/phonegap-plugins/tree/master/Android/Downloader

but this plugin didn't work, I have followed the steps to install, but I get the error of undefined for the downloader.

Here is a example:

window.plugins.downloader.downloadFile("http://samplepdf.com/sample.pdf", {overwrite: true}, 
  function(res) {
    alert(JSON.stringify(result));
}, function(error) {
    alert(error);
}

Thanks.

4

1 回答 1

0

如果您未定义该功能,那么问题是您没有正确安装它。再次按照设置过程进行操作,并确保重建整个项目。看看能不能解决你的问题。

于 2013-08-30T06:29:43.757 回答