Interface AppUsageUploader.UploadListener

  • All Implemented Interfaces:

    
    public interface AppUsageUploader.UploadListener
    
                        

    Listener for the AppUsageUploader to dispatch usage upload events-- progress and completion status.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract void onSuccess() This method is invoked in the UI thread when usage upload completes successfully.
      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.
      abstract void onProgress(int percentUploaded) This method is invoked in the UI thread as the usage upload is in progresses.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • 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.