|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface MediaHttpDownloaderProgressListener
An interface for receiving progress notifications for downloads.
Sample usage:
public static class MyDownloadProgressListener implements MediaHttpDownloaderProgressListener {
public void progressChanged(MediaHttpDownloader downloader) throws IOException {
switch (downloader.getDownloadState()) {
case MEDIA_IN_PROGRESS:
System.out.println("Download in progress");
System.out.println("Download percentage: " + downloader.getProgress());
break;
case MEDIA_COMPLETE:
System.out.println("Download Completed!");
break;
}
}
}
| Method Summary | |
|---|---|
void |
progressChanged(MediaHttpDownloader downloader)
Called to notify that progress has been changed. |
| Method Detail |
|---|
void progressChanged(MediaHttpDownloader downloader)
throws IOException
This method is called multiple times depending on how many chunks are downloaded. Once the download completes it is called one final time.
The download state can be queried by calling MediaHttpDownloader.getDownloadState() and
the progress by calling MediaHttpDownloader.getProgress().
downloader - Media HTTP downloader
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||