Skip to content
Jacksgong edited this page May 21, 2018 · 15 revisions

Welcome to the okdownload wiki!

In fact, OkDownload is FileDownloader2 which extends all preponderance from FileDownloader and beyond.

Import okdownload through gradle

If you import component library it would be enabled by default, such as you import okhttp with implementation "com.liulishuo.okdownload:okhttp:1.0.1" on the gradle file, then okdownload will find it and enable okhttp as default for okdownload.

OkDownload

// core
com.liulishuo.okdownload:okdownload:{latest_version}
// provide sqlite to store breakpoints
com.liulishuo.okdownload:sqlite:{latest_version}
// provide okhttp to connect to backend
// and then please import okhttp dependencies by yourself
com.liulishuo.okdownload:okhttp:{latest_version}

Snapshots of the development version are available in Sonatype's snapshots repository, you can include on your gradle project through:

repositories {
    maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
// core
com.liulishuo.okdownload:okdownload:1.0.3-SNAPSHOT
// provide sqlite to store breakpoints
com.liulishuo.okdownload:sqlite:1.0.3-SNAPSHOT
// provide okhttp to connect to backend
com.liulishuo.okdownload:okhttp:1.0.3-SNAPSHOT

Attension

If you are using com.liulishuo.okdownload:okhttp, please import okhttp by yourself, such as:

implementation 'com.squareup.okhttp3:okhttp:3.10.0'
Clone this wiki locally