win8 中实现断点续传
2014-04-01 21:18
330 查看
1) Resume method does resume on cases where resume is possible. Meaning if the server accepts range-requests, the download would resume, otherwise restart.
2) When you are creating the storage file store your data, you have to use GenerateUnique name enum value to avoid overriding the existing file.
3) If the HttpClient is giving you a hard time with the download, you can always embellish it with a download progress. This would sustain the fluid UI and avoid non responsive application. Here is an example that is to be used with servers which allow chunked encoding: Download / Send Request Async with Progress
(Posted in: Windows 8, WinRT. Tagged: BackgroundDownloader, Download, GetStringAsync, HttpClient,IAsyncOperationWithProgress, SendAsync. 11 Comments)
Hope it helps, and you might want to try to post it to a local group rather than the english one. You might get more responses.
2) When you are creating the storage file store your data, you have to use GenerateUnique name enum value to avoid overriding the existing file.
StorageFile destinationFile = await KnownFolders.PicturesLibrary.CreateFileAsync( destination,CreationCollisionOption.GenerateUniqueName);BackgroundDownloader downloader =newBackgroundDownloader();DownloadOperation download = downloader.CreateDownload(source, destinationFile)
3) If the HttpClient is giving you a hard time with the download, you can always embellish it with a download progress. This would sustain the fluid UI and avoid non responsive application. Here is an example that is to be used with servers which allow chunked encoding: Download / Send Request Async with Progress
(Posted in: Windows 8, WinRT. Tagged: BackgroundDownloader, Download, GetStringAsync, HttpClient,IAsyncOperationWithProgress, SendAsync. 11 Comments)
Hope it helps, and you might want to try to post it to a local group rather than the english one. You might get more responses.
相关文章推荐
- 网站seo优化常见问题和解决方法
- Android listview 不同的项底色不同,点击再变不同颜色
- javascript闭包
- 将vim搭建为一个编辑方便的类C/C++ IDE环境
- 两链表的第一个公共结点
- jQuery事件笔记
- C++ Singleton (单例) 模式最优
- 4月1日 android 记录
- eclipse unp环境配置
- Compare diff type values
- 二进制法求子集的原理(来自基于二进制的集合运算研究)
- 网站优化过程中更要注意站与站的链接
- 函数的调用规则(__cdecl,__stdcall,__fastcall,__pascal)
- Win8.1 IIS6 SQL SERVER 2012 执行 SqlServices.InstallSessionState 出错
- [Jobdu] 题目1529:棋盘寻宝
- 获取手机DPI
- Android多线程
- C#中字符串转换为计算公式(自定义公式的计算)
- hbase 源码解析之master篇2
- Java5实现的线程池