Interface AppUsageUploader.UploadListener
-
- All Implemented Interfaces:
public interface AppUsageUploader.UploadListenerListener for the
AppUsageUploaderto dispatch usage upload events-- progress and completion status.
-
-
Method Summary
Modifier and Type Method Description abstract voidonSuccess()This method is invoked in the UI thread when usage upload completes successfully. abstract voidonError(@NonNull() Throwable error)This method is invoked in the UI thread when usage upload did not complete successfully with one of the following errors: 1. abstract voidonProgress(int percentUploaded)This method is invoked in the UI thread as the usage upload is in progresses. -
-
Method Detail
-
onSuccess
abstract void onSuccess()
This method is invoked in the UI thread when usage upload completes successfully.
-
onError
abstract void onError(@NonNull() Throwable error)
This method is invoked in the UI thread when usage upload did not complete successfully with one of the following errors:
1. HttpException-- error returned from CPMS server.
2. IOException-- when upload is cancelled, or encountered network or persistence store error.
- Parameters:
error- the error occurred during upload
-
onProgress
abstract void onProgress(int percentUploaded)
This method is invoked in the UI thread as the usage upload is in progresses.
- Parameters:
percentUploaded- percent of the usage report uploaded so far.
-
-
-
-