- Notifications
You must be signed in to change notification settings - Fork 2.2k
Get the internal stored data
Jacksgong edited this page Apr 14, 2016 · 1 revision
All task data will be stored in FileDownlaoder Database, and FileDownloader will maintain it automatically.
You can get bellow data anywhere with a DownloadId.
// Get the status. FileDownloader.getImpl().getStatus(downloadId); // Get the downloaded so far bytes. FileDownloader.getImpl().getSofar(downloadId); // Get the total bytes. FileDownloader.getImpl().getTotal(downloadId); And you can get some other data from the call-back method in FileDownloadListener:
Ref: BaseDownloadTask
For example:
task.getTag(); task.getTag(key); task.getEtag(); task.isReusedOldFile(); task.isResuming(); task.getUrl(); task.getEx(); P.S: If you need some more data, recommend maintain your own Database for your business, Ref: TasksManagerDemoActivity
- Initialization
- Start downloading
- Pause or Stop
- Get the internal stored data
- Customizable Component
- Interface