DEV Community

Jeetarc for SimpleDownloader

Posted on

SimpleDownloader v1.0.0

v1.0.0

Stable release of SimpleDownloader with a cleaner API, improved task management, and many more.

Added

  • Multi-download management
  • Instance-based downloader API with SimpleDownloader.getInstance(context) and SimpleDownloader.builder(context).
  • DownloadRequest API for defining individual downloads separately from downloader configuration.
  • Downloader ownership through ownerId, if not set, it use library default: "default_owner".
  • Added support for batch downloads and clearer separation between global downloader settings and per download options.

Fixes & Improvements

  • Safer task management when multiple downloader instances are used.
  • Improved separation of task state, queues, and concurrency between downloader instances.
  • Improved database handling and task ownership.
  • General stability and lifecycle improvements for the stable release.

Migration for beta users

1. Update the dependency:

implementation "com.github.jeetarc:SimpleDownloader:1.0.0"
Enter fullscreen mode Exit fullscreen mode

2. Replace the old download API:

Beta:

DownloadTask task = SimpleDownloader.with(context)
    .setOutput(folderUri, FileName.AUTO)
    .setFileUrl(url)
    .startDownload();
Enter fullscreen mode Exit fullscreen mode

Stable:

SimpleDownloader downloader = SimpleDownloader.getInstance(context);
DownloadRequest request = DownloadRequest.from(folderUri, FileName.AUTO, fileUrl);
DownloadTask task = downloader.startDownload(request);
Enter fullscreen mode Exit fullscreen mode

Use SimpleDownloader.builder(context) and DownloadRequest.builder() for more controls. Read APIs

3. Update listeners:

Move from the beta listener API to the stable APIs:

Beta:

  • DownloadListener

Stable:

  • DownloadTask.Listener
  • SimpleDownloader.Listener

4. Read README for more:

https://github.com/jeetarc/SimpleDownloader/blob/main/README.md

SimpleDownloader on GitHub:
https://github.com/jeetarc/SimpleDownloader

Top comments (0)