Skip to content

v0.2.4

Compare
Choose a tag to compare
@Jacksgong Jacksgong released this 18 Apr 06:53
· 536 commits to master since this release

中文

New Interfaces

  • Add BaseDownloadTask#getSpeed and BaseDownloadTask#setMinIntervalUpdateSpeed: Get the download speed for a task. If it is in processing, the speed would be real-time speed; If finished, the speed would be average speed. Closes #95
  • Add the FileDownloader#startForeground and FileDownloader#stopForeground for supporting the Foreground mode(Service#startForeground); For ensure the FileDownloadService would keep alive when user removed the App from the recent apps. Closes #110 .
  • Support configurations download.min-progress-step and download.min-progress-time: The min buffered so far bytes and millisecond, used for adjudging whether is time to sync the download so far bytes to database and make sure sync the downloaded buffers to the local file. More small more frequent, then download more slowly, but will safer in the scene of the process is killed unexpectedly. Default 65536(MinProgressStep) and 2000(MinProgressTime), which follow the value in com.android.providers.downloads.Constants.
  • Support the configuration process.non-separate in filedownloader.properties: The FileDownloadService runs in the separate process ':filedownloader' as default, if you want to run the FileDownloadService in the main process, set this configuration as true. Closes #106 .

Enhancement

  • Improve Performance: Download more quickly, Optimize the strategy about sync the buffered datum to database and local file when processing. Closes #112 .

Fix

  • Fix: Can't restart the task which in paused but is still settling in the download-pool. Closes #111