views:

1833

answers:

2

Can I use android build-in browser download manager to download files in my application?

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.

+3  A: 

The download manager is not part of the public SDK. You are welcome to download files from URLs via HttpURLConnection or HttpClient, both part of the Android SDK.

CommonsWare
I suspected it's not a part of SDK. But I don't want to use it directly, maybe there is some intent, that can be caught by different download software (including browser download manager)?
begray
+2  A: 

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). Is there anything that could be re-used? Android Market also has a downloader...

Chris