Phonegap : Downloading large files on Windows Phones

痴心易碎 提交于 2019-12-10 15:27:35

问题


I'm developing a mobile app with Phonegap and I need to download zip-files which might be over 50MB.

I'm using Cordova's file-transfer plugin to do this job. Now, on iOS and Android this works just fine, but when I do the same thing on Windows Phone the application hangs out files that are larger than 20MB.

System.OutOfMemoryException: Insufficient memory to continue the execution of the program.

PhonGap documentation has this line which says that downloading is supported only on iOS and Android? http://docs.phonegap.com/en/edge/cordova_file_file.md.html#FileTransfer

It is also possible (only on iOS and Android) to download a file from a remote server and save it on the device.

But what confuses me is that then again this site says that the support is added on some point(?) http://phonegap.com/2012/04/11/phonegap-1-6-released/

Windows - file download API

So, is it really supported on Windows or not? Or is there some alternative way to do this on Windows Phones.


回答1:


Ok, I didn't figure out how to do this with the Apache's File-Transfer plugin directly.

I found this background downloader which was able to download successfully files around 100MB (probably even larger) on Windows Phone 8.1.

https://github.com/sgrebnov/cordova-plugin-background-download



来源:https://stackoverflow.com/questions/31565374/phonegap-downloading-large-files-on-windows-phones

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!