coolerfall / Android-HttpDownloadManager

An useful and effective http/https download manager for Android, support breakpoint downloading.
https://ahdm.coolerfall.com
Apache License 2.0
206 stars 43 forks source link

Make DownloadManager's query methods available as public API #65

Closed tobiasrohloff closed 5 years ago

tobiasrohloff commented 6 years ago

The DownloadManager provides the convenience methods DownloadState query(int downloadId) and DownloadState query(String url). Is there any technical reason who those are not available as public API? Or just a design choice? Would be nice to fetch the download state.

coolerfall commented 6 years ago

Thanks for your issues. All the state is in callback, so why you want to fetch the download state manually. This is just to make downloader simple and easy.

tobiasrohloff commented 6 years ago

There are a lot of use cases, e.g. to fetch if a download is running or already finished.

coolerfall commented 6 years ago

onStart and onSuccess is enough.

tobiasrohloff commented 6 years ago

Not if I have to fetch the state later on demand. Therefore, I have to keep the state in another collection on the application-side at the moment.