com.kinvey.java.core.UploaderProgressListener |
An interface for receiving progress notifications for uploads.
Sample usage:
public static class MyUploadProgressListener implements UploaderProgressListener { public void progressChanged(MediaHttpUploader uploader) throws IOException { switch (uploader.getUploadState()) { case INITIATION_STARTED: System.out.println("Initiation Started"); break; case INITIATION_COMPLETE: System.out.println("Initiation Completed"); break; case DOWNLOAD_IN_PROGRESS: System.out.println("Upload in progress"); System.out.println("Upload percentage: " + uploader.getProgress()); break; case DOWNLOAD_COMPLETE: System.out.println("Upload Completed!"); break; } } }
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract void |
progressChanged(MediaHttpUploader uploader)
Called to notify that progress has been changed.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Called to notify that progress has been changed.
This method is called once before and after the initiation request. For media uploads it is called multiple times depending on how many chunks are uploaded. Once the upload completes it is called one final time.
The upload state can be queried by calling getUploadState()
and the
progress by calling getProgress()
.
uploader | Media HTTP uploader |
---|
IOException |
---|