Tonyofrancis Fetch Versions Save

The best file downloader library for Android

3.0.4

5 years ago

Version 3.0.4

  1. updated documentation
  2. remove has activeDownloads(): Boolean method. Use fun hasActiveDownloads(includeAddedDownloads: Boolean, func: Func<Boolean>): Fetch or fun addActiveDownloadsObserver(includeAddedDownloads: Boolean = false, fetchObserver: FetchObserver<Boolean>): Fetch instead.
  3. Added new methods on Fetch addActiveDownloadsObserver(includeAddedDownloads: Boolean = false, fetchObserver: FetchObserver<Boolean>): Fetch and removeActiveDownloadsObserver(fetchObserver: FetchObserver<Boolean>): Fetch
  4. Added new method on FetchConfiguration fun setHasActiveDownloadsCheckInterval(intervalInMillis: Long): Builder
  5. Added new REPORTING option on Reason enum
  6. Added new method on FetchConfiguration fun createDownloadFileOnEnqueue(create: Boolean): Builder
  7. Fix for starting download immediately whiles enqueuing

3.0.3

5 years ago

Version 3.0.3

  • Bug fixes for hasActiveDownloads method.
  • Download url redirection fixes and improvements
  • Added internet check method to FetchConfiguration called setInternetAccessUrlCheck(url: String?): Builder See documentation on usage.
  • Added new fields redirected and redirectedUrl on Downloader.ServerRequest class.

3.0.2

5 years ago

Version 3.0.2

  • Added Wrapper class around FetchDatabase to provide safer access
  • Added Priority Sort to change the way Fetch queues downloads based on time created.

Note: Fetch 3.1.0 Will be the next big release. The library will be migrating to AndroidX packages. Point releases will be created for the none AndroidX version of the library.

3.0.1

5 years ago

Version 3.0.1

  • Added new method hasActiveDownloads(includeAddedDownloads: Boolean, func: Func<Boolean>)

3.0.0

5 years ago

Version 3.0.0 Version 3 comes with a lot of enhancements and fixes

Fetch:

  • FetchGroupListener. FetchGroupListener extends from FetchListener and allows you to listener for updates on a group. The methods on FetchGroupListener will return a FetchGroup object that contains all the downloads in a group and will inform you which download triggered a change on the group. Also see AbstractFetchGroupListener.

  • Added new method to rename a completed download's file. see Fetch.renameCompletedDownloadFile method.

    Observers:

  • Introducing FetchObserver. Fetch now allows you to subscribe from updates for a single Download or a Group of Downloads. Using the FetchObserver and FetchGroupObserver interface respectively. See Fetch.attachFetchObserversForDownload(id, observers...) documentation for more information. Also check the sample app for usage.

  • Introducing FetchGroup. FetchGroup is an object that contains all information about a group Fetch manages. The group is automatically updated any time a download from the group updates. You can subscribe to FetchGroup's using the FetchGroupObserver. FetchGroupObservers attached to a FetchGroup will be notified when downloads on a group changes. You will be notified of the Reason for the change as well. See Fetch.getFetchGroup(id, callback) documentation for more information.

    Database:

  • Fetch now allows you to provide your own database manager to manage downloads. See the FetchDatabaseManager documentation and FetchConfiguration.Builder class to get started. Note: Fetch depends on your FetchDatabaseManager methods to be synchronized to work correctly.

    Download:

  • Added new fields on the Download objects. Fields: etaInMilliSeconds, downloadedBytesPerSecond. See documentation.

    Fixes & Small Improvements:

  • You can now set the Handler Fetch will use to perform all operations on. See FetchConfiguration.Builder.setHandler method.

  • Fixed a bug that prevented notification buttons (pause, cancel, resume, etc) from firing the intent.

2.3.6

5 years ago

Version 2.3.6

  • Out of Memory Error. Fixed issued in the downloader where an out of memory error would occur.

2.3.5

5 years ago

Version 2.3.5

  • Fetch methods removeAllInGroupWithStatus, deleteAllInGroupWithStatus, getDownloadsInGroupWithStatus have been updated to allow more than one Status to be queried or actioned upon. See Java doc for details . Special thanks to Marcin Adamczewski for submitting PR.
  • Fetch logging is now disabled by default and can be enabled with the FetchConfiguration method. .enableLogging(true)
  • The Error enum object now has a new field attach httpResponse. This response object contains the HttpCode and other http related information. This field is only provided when an error occurs and it is related to the Http response.
  • Fixed EnqueueAction.UPDATE_ACCORDINGLY that caused the onComplete listener method to be called if the newly enqueued request was previously downloaded and completed but the file on the storage system was delete.

2.3.4

5 years ago

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

5 years ago

Version 2.3.3

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

2.3.2

5 years ago

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