I want to download and save image from server in Android. So, I came to know about DownloadManager
& Input, Output Stream
. Both are working fine from my side.
But, I want to know that which one is better to use ? DownloadManager
is supportable from Api 9
and my app Target Api
is 8. So, I was planning to use DownloadManager
for api>8
and Input, Output Stream
for api 8
.
Asked
Active
Viewed 555 times
0

CSAT
- 207
- 1
- 2
- 13
1 Answers
0
Download Manager is a good choice for handling downloads. It also supports resuming the download(if the link has resume capability). It also provides you with broadcasts to catch the completion or failing of download. But detecting the progress is limited i.e. there is no such broadcast to catch the progress. You have to manually add some thread to monitor the DownloadManager object. Also pausing the download is not provided. You can only cancel it. Still, I guess DownloadManager is better approach.

berserk
- 2,690
- 3
- 32
- 63