The best file downloader library for Android
Version 3.2.0/ Androidx version 3.2.0
Version 3.0.12/ Androidx version 3.1.6
Big thanks to everyone who contributed and open issues. Happy Holidays. Stay Safe!
Version 3.0.11/ Androidx version 3.1.5 2. Notification sound fixes. 3. RxJava fixes. 4. Content Length fixes 5. Added NetworkType.UNMETERED 6. Lots of bug fixes.
Thanks to everyone who contributed!
Version 3.0.10/ Androidx version 3.1.4
getAllGroupIds(callback)
that returns all group id's being managed by Fetch.getDownloadsByTag(tag, callback)
that returns all download's being managed by Fetch with the specified tag.Special thanks to @alvince and @DHosseiny for providing fixes for this release.
Version 3.0.9/ Androidx version 3.1.3
Version 3.0.8/ Android x version 3.1.2
fun preAllocateFileOnCreation(preAllocateFile: Boolean)
to enable or disable this feature. On by default.fun getContentLengthForRequests(requests:List<Request>, fromServer: Boolean, func: Func<List<Pair<Request,Long>>>, func2: Func<List<Pair<Request, Error>>>): Fetch
Version 3.0.7/ Android x version 3.1.1 Added new pauseAll method on Fetch. Added new resumeAll method on Fetch. Better logging. Library code cleanup. Special thanks to Alex Starchenko for submitting the fixes and improvements
Androidx version identical to 3.0.6
Version identical to the androidx version 3.1.0
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.
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);