Skip to content

Releases: lingochamp/FileDownloader

v1.3.9

18 Dec 12:49
Compare
Choose a tag to compare

中文

Important:

  • Since this version you can customize you own FileDownloadConnection component, we use this one as default.
  • Since this version, FileDownloader don't dependency the okhttp as default.

If you still need to configure timeoutproxy for the connection component, but you don't want to implement your own one, configurations, I implement it for the default connection component too, just move to: DemoApplication, check the code if you want.

New Interfaces

  • Add FileDownloadQueueSet#reuseAndStart: Add reuseAndStart function to the queue-set to reuse task instances before start them. Ref #383
  • Add FileDownloadConnection: Support customize the connection component for FileDownloader and remove the dependency of the okhttp as default. Closes #158

v1.3.0

31 Oct 08:13
Compare
Choose a tag to compare

中文

New Interfaces

  • Add FileDownloadSerialQueue: Easy to dynamically manage tasks and tasks in the queue will automatically start download one by one. Closes #345.
  • Remove the callback method in the FileDownloadListener class, besides adding the FileDownloadListener#isInvalid method to tell the FileDownloader whether the listener has already invalidated, which means it can't receive any messages.
  • Add FileDownloader#clearAllTaskData: Clear all data in the filedownloader database. Closes #361

Enhancement

  • Improve Practicability(FileDownloadListener#blackCompleted): Ensure the blockCompleted callback method can accept any Exception. Closes #369.
  • Improve Practicability(service-not-connected): Print the tips with the cause in service-not-connected-helper, in this way, when you invoke some methods need the FileDownload service has already connected but not yet, FileDownloader will not only print causes in the Logcat but also print the tips.

Fix

  • Fix(reuse): fix BaseDownloadTask#reuse is called shortly after the call to BaseDownloadTask#pause may raise an exception. Closes #329.

v1.2.2

15 Oct 10:40
Compare
Choose a tag to compare

中文

  • Fix(fatal-crash): fix when the task doesn't have FileDownloadListener, we can't receive the callback of FileDownloadMonitor.IMonitor#onTaskOver for it. Closes #348.

v1.2.1

09 Oct 14:13
Compare
Choose a tag to compare

中文

Fix

  • Fix(fatal-crash): fix when the task doesn't have FileDownloadListener, we can't receive the callback of FileDownloadMonitor.IMonitor#onTaskOver for it. Closes #348. Sorry for my mistake, this bug is still exist in 1.2.1 and finally fixed in 1.2.2.

v1.2.0

04 Oct 15:11
Compare
Choose a tag to compare

中文

New Interfaces

  • Add FileDownloader#insureServiceBind(): Easy to block the current thread, and start FileDownloader service, after the service started then executes the request which needs the service alive. Refs #324.
  • Add FileDownloader#insureServiceBindAsync(): Easy to start FileDownloader service, and after the service started then executes the request which needs the service alive. Refs #324.
  • Add FileDownloader#bindService(runnable:Runnable): Easy to start FileDownloader service, and after the service started then executes the runnable. Refs #324.
  • Add FileDownloader#init(Context,InitCustomMaker): Easy to initialize the FileDownloader engine with various kinds of customized components.

Enhancement

  • Improve Practicability(InitCustomMaker#database): Support customize the database component with the implementation of FileDownloadDatabase, and implements the default database component: DefaultDatabaseImpl.
  • Improve Practicability(InitCustomMaker#outputStreamCreator): Support customize the output stream with the implementation of FileDownloadOutputStream, and implements the default output stream component FileDownloadRandomAccessFile, and some alternative components: FileDownloadBufferedOutputStreamFileDownloadOkio.

v1.1.5

29 Sep 05:37
Compare
Choose a tag to compare

中文

New Interfaces

  • Support the configuration file.non-pre-allocation in filedownloader.properties: Whether doesn't need to pre-allocates the 'content-length' space when to start downloading, default is false. Closes #313 .

Fix

  • Fix(fatal-crash): fix occur the StackOverflowError when thread pool getActiveCount is not right because of it just an approximate number. Closes #321 .
  • Fix(minor-crash): fix in some minor cases occur IllegalStateException which message is 'No reused downloaded file in this message'. Closes #316 .
  • Fix(minor-crash): fix when there are several serial-queues started in case of the FileDownloader service doesn't connect yet and in minor cases that the same task in the queue will be started twice which lead to crash. Refs #282 .

Others

  • Dependency: Cancel the dependence of thread-pool library. Refs #321 .
  • MinSDKVersion: Upgrade minSdkVersion : 8->9. Refs #321 .

v1.1.0

13 Sep 14:09
Compare
Choose a tag to compare

中文

New Interfaces

  • Add BaseDownloadTask#setWifiRequired: Set whether the task only allows downloading on the wifi network type. Default false. Closes #281 .

Enhancement

  • Improve Performance: Alternate all thread pools to exceed-wait-pool(more detail: docs in FileDownloadExecutors) and all threads in pools will be terminate after idle 5 second. Refs #303 .
  • Improve Practicability: Handle any Throwables thrown on FileDownloadListener#blockComplete method and callback to FileDownloadListener#error method instead of FileDownloadListener#completed. Closes #305 .

Fix

  • Fix(lost-connect): Prevent the waiting-connect-list contains duplicate tasks in minor cases.

v1.0.2

06 Sep 12:52
Compare
Choose a tag to compare

中文

Version 1.0.2

2016-09-06

Fix

  • Fix: When the service didn't connect and now it is connected and FileDownloader tries to restart the 'queue-task's which in the waiting-service-connect list but occur an IllegalStateException. Closes #307 .

v1.0.1

05 Sep 03:56
Compare
Choose a tag to compare

中文迭代日志

New Interfaces

If you used BaseDownloadTask#ready() which is a deprecated method now, just migrate it to BaseDownloadTask#asInQueueTask():InQueueTask and InQueueTask#enqueue().

  • Add BaseDownloadTask#asInQueueTask():InQueueTask and Deprecated BaseDownloadTask#ready(): Declare the task is a queue task, what will be assembled by a queue which makes up of the same listener task and there is a method InQueueTask#enqueue() to enqueue this task to the global queue to ready for being assembled by the queue. The operation of method InQueueTask#enqueue() is the same to the Deprecated method BaseDownloadTask#ready(), we wrap the ready() method in this way just want you to know clearly: Only if the task belongs to a queue, you need to invoke this method otherwise if this task is an isolated task but you invoke this method, it's wrong and you will receive an exception(More detail reason please move to the exception thrown in DownloadTask#start).

Fix

  • Fix: Maybe occur an IllegalStateException when there are several isolated tasks and queues with the same listener object, and they are started in the different thread simultaneously. Closes #282 .

v1.0.0

21 Aug 07:12
Compare
Choose a tag to compare

中文

New Interfaces

  • Add BaseDownloadTask#cancel: This method is used for explaining why the pause operation is the same as the cancel operation.

Enhancement

  • Improve Performance: Hold the result of isDownloaderProcess.
  • Improve Practicability: Refactor the visible layer of the code. Closes #283
  • Improve Practicability: Perfect the java doc. Closes #284
  • Improve Practicability: Add the java doc website: http://fd.dreamtobe.cn. Closes #285