Skip to content

Releases: tonyofrancis/Fetch

3.1.0

26 Apr 20:31
Compare
Choose a tag to compare

Androidx version identical to 3.0.6

3.0.6

26 Apr 20:31
Compare
Choose a tag to compare

Version identical to the androidx version 3.1.0

3.0.5

26 Apr 19:33
Compare
Choose a tag to compare

Version 3.0.5
This release only adds a new Feature that allows Fetch to auto retry failed downloads for any reason. Set the number of times Fetch will auto retry a download when it fails.
This feature if off by default.

  1. New fields added on Download: autoRetryMaxAttempts and autoRetryAttempts. See Java docs.
  2. New field added on RequestInfo: autoRetryMaxAttempts. See Java docs.
  3. New method added on Fetch: fun resetAutoRetryAttempts(downloadId: Int, retryDownload: Boolean = true, func: Func2<Download?>? = null, func2: Func? = null): Fetch
  4. New method added on RXFetch: fun resetAutoRetryAttempts(downloadId: Int, retryDownload: Boolean = true): Convertible<Download?>
  5. New method added on FetchConfiguration: fun setAutoRetryMaxAttempts(autoRetryMaxAttempts: Int): Builder. See Java Docs
        final FetchConfiguration fetchConfiguration = new FetchConfiguration.Builder(this)
                .enableRetryOnNetworkGain(true)
                .setDownloadConcurrentLimit(2)
                .setAutoRetryMaxAttempts(10) // set global auto retry max attempts for all downloads.
                .build();
        final Fetch fetch = Fetch.Impl.getInstance(fetchConfiguration);

        //OR

        final String url = "dummy url";
        final String file = "dummy file";
        final Request request = new Request(url, file);
        request.setAutoRetryMaxAttempts(5); // set auto retry on individual downloads.

        fetch.getDownload(request.getId(), download -> {
            if (download != null) {
                download.getAutoRetryAttempts(); //get the number of auto retry attempts.
                download.getAutoRetryMaxAttempts(); //get the number of max attempts.
            }
        });

        //reset the auto retry attempts for a download
        fetch.resetAutoRetryAttempts(request.getId(), true, null, null);

3.0.4

22 Apr 18:25
Compare
Choose a tag to compare

Version 3.0.4

  1. updated documentation
  2. remove has activeDownloads(): Boolean method. Use fun hasActiveDownloads(includeAddedDownloads: Boolean, func: Func): Fetch or fun addActiveDownloadsObserver(includeAddedDownloads: Boolean = false, fetchObserver: FetchObserver): Fetch instead.
  3. Added new methods on Fetch addActiveDownloadsObserver(includeAddedDownloads: Boolean = false, fetchObserver: FetchObserver): Fetch and removeActiveDownloadsObserver(fetchObserver: FetchObserver): 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

30 Mar 19:22
Compare
Choose a tag to compare

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

16 Mar 01:55
Compare
Choose a tag to compare

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

03 Mar 14:14
Compare
Choose a tag to compare

Version 3.0.1

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

3.0.0

03 Mar 13:29
Compare
Choose a tag to compare

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

14 Jan 17:04
Compare
Choose a tag to compare

Version 2.3.6

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

2.3.5

10 Jan 15:52
Compare
Choose a tag to compare

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.