简体   繁体   English

Android浏览器下​​载管理器

[英]Android browser download manager

Can I use android build-in browser download manager to download files in my application? 我可以使用android内置浏览器下载管理器下载我的应用程序中的文件吗?

In case of audio files, opening remote file url using Intent.ACTION_VIEW with data type "audio/*" causes browser to start playback, but I'd like to force download of specified file. 如果是音频文件,使用Intent.ACTION_VIEW打开远程文件URL,数据类型为“audio / *”会导致浏览器开始播放,但我想强行下载指定的文件。

The download manager is not part of the public SDK. 下载管理器不是公共SDK的一部分。 You are welcome to download files from URLs via HttpURLConnection or HttpClient , both part of the Android SDK. 欢迎您通过HttpURLConnectionHttpClient从URL下载文件,这两者都是Android SDK的一部分。

I am wondering exactly the same. 我想知道完全一样。 It seems like a waste of time to write a service which handles download/resume/checking connection etc, when I just want to say downloadFile(URL myURL). 当我只想说downloadFile(URL myURL)时,编写一个处理下载/恢复/检查连接等的服务似乎是浪费时间。 Is there anything that could be re-used? 有什么可以重复使用的吗? Android Market also has a downloader... Android Market还有一个下载程序...

http://developer.android.com/reference/android/app/DownloadManager.html http://developer.android.com/reference/android/app/DownloadManager.html

Can some one tell what is this? 有人能说出这是什么意思吗? If download Manager isnt a part of SDK. 如果下载管理器不是SDK的一部分。

Seems to me like a complete download manager. 对我来说就像一个完整的下载管理器。 I will try this soon. 我会尽快尝试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM