KupilDownloader is a lightweight and efficient Android library designed to manage background file downloads with support for task queuing, resumable downloads, and database-backed progress tracking.
- 🔄 Resumable download support
- 🚀 Multiple parallel downloads
- 📥 Status tracking: Started, In Progress, Completed, Paused, Error
- 📦 Simple integration with custom builder pattern
- 🧩 Clean and modular architecture
📸 Screenshot
|
🎞️ Demo
|
Ensure your app has the following:
- Android
minSdkVersion24+ - Add required permissions in your
AndroidManifest.xml:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />📌 Use scoped storage for newer Android versions if required.
- Add JitPack to your root
build.gradle:
allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}- Add the dependency:
dependencies {
implementation 'com.github.muhamadsyafii:KupilDown:1.2'
}dependencies {
implementation("com.github.muhamadsyafii:KupilDown:1.2")
}In your Application class:
class KupilApp : Application() {
lateinit var kupilDownloader: KupilDownloader
override fun onCreate() {
super.onCreate()
kupilDownloader = KupilDownloader.create(applicationContext)
}
}val kupilDownloader = (applicationContext as KupilApp).kupilDownloader
val request = kupilDownloader
.newRequestBuilder(url = "https://example.com/file.mp4", dirPath = "/Download", fileName = "video.mp4")
.tag("video-download")
.build()
val downloadId = kupilDownloader.enqueue(
request,
onStart = { /* Update UI */ },
onProgress = { progress -> /* Update progress bar */ },
onCompleted = { /* Notify completion */ },
onPause = { /* Handle pause */ },
onError = { error -> /* Show error */ }
)kupilDownloader.pause(downloadId)
kupilDownloader.resume(downloadId)
kupilDownloader.cancel(downloadId)You can also cancel by tag or all at once:
kupilDownloader.cancel("video-download")
kupilDownloader.cancelAll()The sample project includes a UI with 6 files downloading simultaneously using KupilDownloader. It demonstrates handling of:
- Start/Cancel toggle
- Pause/Resume
- Status tracking and progress
Simply run the MainActivity to test.
git clone https://github.com/muhamadsyafii/KupilDown.git
cd KupilDown
./gradlew installDebugPull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.
MIT License
Copyright (c) 2025 Muhamad Syafii
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Developed by Muhamad Syafii · GitHub
Feel free to ⭐️ the repo if you find it helpful!

