Kdownloader – A file downloader library for Android with pause and resume support


Overview of Kdownloader library

  • Kdownloader can be used to download any type of files like image, video, pdf, apk and etc.
  • This file downloader library supports pause and resume while downloading a file.
  • Supports large file download.
  • This downloader library has a simple interface to make download request.
  • We can check if the status of downloading with the given download Id.
  • Kdownloader gives callbacks for everything like onProgress, onCancel, onStart, onError and etc while downloading a file.
  • Supports proper request canceling.
  • Many requests can be made in parallel.
  • All types of customization are possible.

Using Kdownloader Library in your Android application

Update your settings.gradle file with the following dependency.

dependencyResolutionManagement {
    repositories {
        maven { url 'https://jitpack.io' } // this one

Update your module level build.gradle file with the following dependency.

dependencies {
    implementation 'com.github.varungulatii:Kdownloader:1.0.3'

Do not forget to add internet permission in manifest if already not present

<uses-permission android:name="android.permission.INTERNET" />

Then initialize it in onCreate() Method of application class :

kDownloader = KDownloader.create(applicationContext)

Then use it in your activity as :

kDownloader = (applicationContext as MyApplication).kDownloader
val request = kDownloader
    .newRequestBuilder(url, dirPath, fileName,)
downloadId = kDownloader.enqueue(request1, 
    onStart = {
    onProgress = {
    onCompleted = {
    onError = {
    onPause = {

Pause a download request :


Resume a download request


Cancel a download request

// Cancel with the download id

// The tag can be set to any request and then can be used to cancel the request

// Cancel all the requests

Clean up resumed files if database enabled

// Method to clean up temporary resumed files which is older than the given day


  • Download notifications


View Github