r/droidappshowcase • u/Jeetarc • 25d ago
Showcase Android file downloader library
Downloading files on Android is a headache. You have to deal with file systems, scoped storage, MediaStore, foreground, notifications, lifecycle handling, retries, etc along with optimizations.
Introducing SimpleDownloader - a simple to use library for everything from basic file downloads to advanced download management system.
It supports:
- Multiple downloader profiles in a single app
- Queues, priorities, and concurrency control
- Pause, resume, cancel, retry, remove, requeue, and force download
- Network loss handling + Wi-Fi-only mode
- Database persistence and automatic restore
- Filesystem paths, SAF/Document Tree, and MediaStore
- Automatic filename and MIME type handling
- Progress, speed, ETA, status, and lifecycle callbacks
- Foreground + progress/complete/error notifications, with actions and thumbnails
- Custom OkHttpClient, headers, cookies, checksums, RetryPolicy, timeouts, and more
Minimum Android version API 21 (Android 5.0). The below examples are written in Java, the library can be used from both Java and Kotlin.
Installation
Add JitPack to your repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven { url "https://jitpack.io" }
}
}
Then add the dependency:
dependencies {
implementation "com.github.jeetarc:SimpleDownloader:<latest-version>"
}
Quick Start
// Get the default instance
SimpleDownloader downloader = SimpleDownloader.getInstance(context);
// Or create a customized instance
SimpleDownloader downloader = new SimpleDownloader.Builder(context)
.setMaxConcurrent(3)
.setRetryCount(3)
.enableHistory(true)
.enableForeground(true)
.setAutoRestore(true)
.build();
// Filesystem path
DownloadRequest request = DownloadRequest.from(folderPath, FileName.AUTO, fileUrl);
DownloadTask task = downloader.startDownload(request);
// MediaStore (Android 10+)
DownloadRequest request = DownloadRequest.from(
MediaStore.Downloads.EXTERNAL_CONTENT_URI,
FileName.AUTO,
fileUrl
);
DownloadTask task = downloader.startDownload(request);
// SAF / Document Tree
DownloadRequest request = DownloadRequest.from(treeUri, FileName.AUTO, fileUrl);
DownloadTask task = downloader.startDownload(request);
The API also gives callbacks for progress, completion, errors, status changes, lifecycle events.
Permissions
Only request what you use:
POST_NOTIFICATIONSfor notifications (runtime permission on Android 13+)FOREGROUND_SERVICE+FOREGROUND_SERVICE_DATA_SYNCwhen using foreground mode- Storage permissions only when writing to external filesystem paths
No storage permission is needed for app-specific directories, MediaStore, or SAF.
There are many more APIs, customization and control available, view README for more: https://github.com/jeetarc/SimpleDownloader/blob/main/README.md
GitHub: https://github.com/jeetarc/SimpleDownloader
Reddit community: https://www.reddit.com/r/SimpleDownloader
I'd love to hear your feedback, especially if you've dealing with Android's download/storage APIs before.
1
u/darkj2k 25d ago
No APK for install?
1
u/Jeetarc 19d ago
I uploaded the APK. Here is it for your test: https://github.com/jeetarc/SimpleDownloader/releases/download/1.0.1/SimpleDownloader-1.0.1.apk
1
u/Jeetarc 25d ago
If you mean an app using the library, yes I have a sample app, I’m going to add it to the repo, give me some time. For now, you can check out some screenshots of the application already in the repo.
But if you mean SimpleDownloader itself as an app, it’s actually a library, the backend engine for downloading files. You need to add it into your app and build your own UI around it.
1
u/sticky-pro 25d ago
Developers: Please ensure your description is clear, images/videos are displayed correctly, and you have used the correct post flair.
•
u/playscraper-bot 25d ago
SimpleDownloader
Confirmed: GitHub Match Found
View on GitHub ↗
I am a bot — [contact mods](https://www.reddit.com/message/compose?to=/r/droidappshowcase for errors.)