Skip to content

Configuration

lifengsofts edited this page Mar 14, 2017 · 1 revision

Here you can customize the database path, timeout, download the number of tasks, the number of threads.

Config config = new Config();
//set database path.
config.setDatabaseName("/sdcard/a/d.db");

//set download quantity at the same time.
config.setDownloadThread(3);

//set each download info thread number
config.setEachDownloadThread(2);

// set connect timeout,unit millisecond
config.setConnectTimeout(10000);

// set read data timeout,unit millisecond
config.setReadTimeout(10000);
DownloadService.getDownloadManager(this.getApplicationContext(), config);
Clone this wiki locally