Phonegap:在Windows Phone上下载大文件 [英] Phonegap : Downloading large files on Windows Phones

查看:167
本文介绍了Phonegap:在Windows Phone上下载大文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Phonegap开发移动应用,我需要下载可能超过50MB的zip文件。

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

我使用Cordova的文件传输插件做这项工作。现在,在iOS和Android上这个工作很好,但是当我在Windows Phone上做同样的事情时,应用程序挂起大于20MB的文件。

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:内存不足,无法继续执行
程序。

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

PhonGap文档中有此行这说明只有在iOS和Android上才支持下载?
http://docs.phonegap.com/en/edge /cordova_file_file.md.html#FileTransfer

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


也可以(仅限iOS和Android)从
a远程服务器并保存在设备上。

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

但是让我困惑的是, (?)
http:// phonegap.com/2012/04/11/phonegap-1-6-released/

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 - 文件下载API

Windows - file download API

那么,是否真的在Windows上支持?

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

推荐答案

好吧,我没有想出如何做到这一点与Apache的文件传输插件直接。

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

我发现这个背景下载器能够在Windows Phone 8.1上大约100MB(可能更大)下载成功的文件。

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

这篇关于Phonegap:在Windows Phone上下载大文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆