Jacksgong edited this page Jun 13, 2018 · 14 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.3" 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.4-SNAPSHOT
// provide sqlite to store breakpoints
com.liulishuo.okdownload:sqlite:1.0.4-SNAPSHOT
// provide okhttp to connect to backend
com.liulishuo.okdownload:okhttp:1.0.4-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'
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.