Skip to content

Releases: tonyofrancis/Fetch

2.3.4

18 Dec 21:01
Compare
Choose a tag to compare

Version 2.3.4

  • Added default cookie manager for the okhttp and httpurlconnection client Downloaders.
  • Fixed an EnqueueAction.INCREMENT_FILE_NAME bug where files were not properly created.
  • Download, Request, DownloadBlock and other data classes now extend Serializable.
  • Okhttp and HttpUrlConnection clients now add a default Referer header to each request if
    one is not provided. Default Referer is the host of the url passed in the request.
  • Behavior change and Updates for ActiveDownloads method on Fetch. The ActiveDownload method
    can now only be called on threads other than the Main(UI) Thread. The ActiveDownload method
    now correctly return true if there are active downloads. Downloads with a queued or Downloading status.
    Note: Calling this method on a UI thread will throw a FetchException.
  • Added new awaitFinish methods on Fetch. The awaitFinish method blocks the current non UI thread
    until Fetch has completed all enqueued downloads. The awaitFinishTimeout method takes in a time in milliseconds
    to release the hold if Fetch has not completed all downloads in the allocated timeframe.
    Passing 0 to the awaitFinishTimeout method will hold the thread indefinitely(Never releasing).
    Recommend to use the awaitFinishTimeout method inside Android Workers and release the task when a certain amount of time has passed. See Java docs for details.
    Note: Calling this method on a UI thread will throw a FetchException.

2.3.3

04 Dec 21:56
Compare
Choose a tag to compare

Version 2.3.3

  • Fixed return type of Downloader interface method onPreClientExecute. Now returns Void correctly.

2.3.2

01 Dec 21:19
Compare
Choose a tag to compare

Version 2.3.2

  • Downloader interfaces and classes that extend Downloader now have a new method called onPreClientExecute(client: T, request: Downloader.ServerRequest): R?
    This method allows you to specify settings on the client before executing the request.
  • Fixed resume bug with Parallel downloader

2.3.1

17 Nov 21:48
Compare
Choose a tag to compare

Version 2.3.1
This is the first stable version of Fetch 2. Enjoy.

  • Fixed an issue where the priority queue backoff would not work correctly.
  • Fixed an issue where request with a file uri would not resume correctly.
  • Fixed an issue where the Fetch database would crash on large group calls.
  • Added new method fun fileExists(file: String): Boolean on StorageResolver.
  • Added new method getServerResponse for Fetch and RxFetch.
  • Fixed an issue where completed download notifications using the DefaultNotificationManager would
    show the progress bar when a download completed.

2.3.0-RC1

07 Nov 17:28
Compare
Choose a tag to compare

Version 2.3.0-RC1
This version has lots of changes, improvements and bug fixes. Please read carefully.

New

  1. Fetch now supports notifications via the FetchNotificationManager interface.
    See DefaultFetchNotificationManager class and sample code on usage.
  2. Fetch now supports saving downloads to URI paths via StorageResolver.
    See sample code and DefaultStorageResolver class for usage.
  • New constructor added for Request object. Request(url, Uri)
  • New get method added on Request object. request.getFileUri()
  • New get method added on Download interface. download.getFileUri()
  • New set method added on FetchConfiguration.Builder class. builder.setStorageResolver(storageResolver)
  • New set method added on FetchConfiguration.Builder class. builder.setNotificationManager(fetchNotificationManager)
  • New interface added FetchNotificationManager. See java Docs.
  • New class added DefaultFetchNotificationManager. See java Docs.
  • New interface added StorageResolver. See javaDocs.
  • New class added DefaultStorageResolver. See java Docs.

Bug Fixes

  • Improvements and bug fixes to Parallel and Sequential file downloader.
  • Fixed an issue where the onCompleted method would not be called for downloads with unknown content length.
  • Fixed bug where EnqueueAction.DO_NOT_ENQUEUE_IF_EXISTING would throw an exception when it should not.
  • Improvements to EnqueueAction.Update_ Accordingly
  • Tons of bug fixes and performance improvements.

Breaking Changes

  • The Fetch and RxFetch List enqueue method now has a new signature.
    fun enqueue(requests: List, func: Func<List<Pair<Request, Error>>>? = null): Fetch
    See Java Docs for more information. The new signature allows for the case where a request may fail
    to enqueue but other request are still enqueued instead of the whole operation being terminated.
    If the Error is Error.NONE this means that the download was successfully enqueued. Otherwise
    this means that the enqueue for the request failed.
  • In order to make Fetch more modular and accommodating to different application environments,
    the following methods were removed from the Downloader interface and are now on the StorageResolver interface.
    If you are overriding these methods, you must extend the StorageResolver interface or DefaultStorageResolver class
    and set an instance on the Fetch Configuration builder you are using to create your Fetch instance.
    Methods Moved:
    fun getRequestOutputResourceWrapper(request: Downloader.ServerRequest): OutputResourceWrapper
    fun getDirectoryForFileDownloaderTypeParallel(request: Downloader.ServerRequest): String

2.2.0-RC16

24 Oct 15:30
Compare
Choose a tag to compare

Version 2.2.0-RC16

  • Enqueue Action bug fixes

2.2.0-RC15

23 Oct 19:24
Compare
Choose a tag to compare

Version 2.2.0-RC15

  • Network state check improvements.
  • Fetch.getHasActiveDownloads() should now report accurately.
  • Added new getListenerSet() method on Fetch. This returns the set of listeners attached to the Fetch instance.
  • Fixed database error not parsing error correctly to Error enum for consumption.
  • Fixed enqueue request bug.
  • Improvements to Sequential downloader.
    Breaking Changes
  • Improvements for verifying the hash of a completed download.
  • FetchConfiguration method enableMD5Check(enabled: Boolean) has been renamed to enableHashCheck(enabled: Boolean)
  • Downloader interface verifyMD5Hash method has been renamed to verifyContentHash. See Java docs.
  • New method added on Downloader interface called getContentHash. See Java docs.
  • Error value INVALID_MD5_HASH has been renamed to INVALID_CONTENT_HASH

Special Thanks to @akurni for submitting the Hash check improvements pull request and making Fetch more awesome!

2.2.0-RC14

30 Sep 15:51
Compare
Choose a tag to compare

Version 2.2.0-RC14

  • Added new EnqueueAction (UPDATE_ACCORDINGLY) which is now the default EnqueueAction. (NEW)
  • Bug fixes to Fetch and RxFetch enqueue methods.(BEHAVIOR CHANGE)
  • Bug fixes to Fetch and RXFetch updateRequest methods. (BEHAVIOR CHANGE)
  • Added new boolean param called updatedListeners for Fetch and RxFetch updateRequest methods. (BREAKING CHANGE)
  • Improvements and bug fixes to download processing backoff strategy.

2.2.0-RC13

20 Sep 16:27
Compare
Choose a tag to compare

Version 2.2.0-RC13

  • Added new backoff logic for the queue processor

2.2-RC12

17 Sep 00:22
Compare
Choose a tag to compare

Version 2.2.0-RC12

  • Added new method enableFileExistChecks(enabled: Boolean) on FetchConfiguration class
  • Small fixes to ParallelDownloader