I have Application play some mp3 files from the internet
and I want to add “Download Button” to download any mp3 file from the internet
I want to download from the browser ,,, not from Application ,,, but if I want to call the browser such as :
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(“xxxx.xxxx.xxxx.mp3”)));
the browser going to play this mp3 file 🙁
I think I can add thing after the link to download directly ,,,, any one can help me ?
Note : if you have a code to download from the App ,,, tell me about it also 🙂
I’m new in android world 😛 and I want a simple code to can understand it
thank you all 🙂
You would be better off using the DownloadManager.
You can see example code by Lars Vogel here
The relevant bit:
Note that DownloadManager is available on API version 9 (Android 2.3, Gingerbread) and upwards.