Skip to content

Pause or Stop

Jacksgong edited this page Sep 29, 2016 · 4 revisions

For FileDownloader, only one interface pause to cover both Pause and Stop action, because if you pause the task, all data about the task will be removed in the memory and stop the task, but when you re-start the task with the same Url and Path, it will resume from the break-point automatically.

Best Practice

// Pause a queue.
FileDownloader.getImpl().pause(listener);

// Pause a task.
FileDownloader.getImpl().pause(downloadId);
// Or
task.pause();

// Pause all running task.
FileDownloader.getImpl().pauseAll();