-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Initialization
Jacksgong edited this page Mar 14, 2017
·
43 revisions
FileDownloader is installed by adding the following dependency to your build.gradle file:
dependencies {
compile 'com.liulishuo.filedownloader:library:1.4.2'
}
To begin using FileDownloader, have yourApplication#onCreate
invoke the FileDownloader.init(this)
such as:
If your want to customize
OkHttpClient
for downloading files, @see DemoApplication
public XXApplication extends Application{
...
@Override
public void onCreate() {
super.onCreate();
/**
* Just for cache Application's Context, and ':filedownloader' progress will NOT be launched
* by below code, so please do not worry about performance.
*/
FileDownloader.init(getApplicationContext());
}
...
}
- Initialization
- Start downloading
- Pause or Stop
- Get the internal stored data
- Customizable Component
- Interface