Package 

Class DownloadStatus

  • All Implemented Interfaces:
    android.os.Parcelable

    
    public class DownloadStatus
     implements Parcelable
                        

    Download status describes the current status of a download request.

    • Method Detail

      • getTime

         long getTime()

        Gets the date and time when the status changed as number of milliseconds sinceJanuary 1, 1970, 00:00:00 GMT.

      • getCode

         int getCode()

        Gets the status code of the download request.

      • setCode

         void setCode(int code)

        Sets the status code.

        Parameters:
        code - the status code.
      • getReason

         int getReason()

        Gets the reason code of the download request, if any.

      • setReason

         void setReason(int reason)

        Sets the reason code related to the download status

        Parameters:
        reason - the reason code.
      • getBytesDownloaded

         long getBytesDownloaded()

        Gets the total number of bytes downloaded so far.

      • getActualSize

         long getActualSize()

        Gets the actual total size of the file as number of bytes.

      • getEstimatedSize

         long getEstimatedSize()

        Gets the estimated total size of the file as number of bytes.

      • isMarkedForDeletion

         boolean isMarkedForDeletion()

        Checks if the status indicates the download is currently marked for deletion.

      • getStatusMessage

         int getStatusMessage()

        Converts the current status code to a string resource identifier that explains status.

      • toStatusMessage

         static int toStatusMessage(int code)

        Converts the given status code to a string resource identifier that explains the status.

        Parameters:
        code - the status code.
      • getReasonMessage

         int getReasonMessage()

        Converts the current status code the string resourced identifier that explains the status.

      • toReasonMessage

         static int toReasonMessage(int reason)

        Converts the given reason code to a string resource identifier that explains the reason.

        Parameters:
        reason - the reason code.
      • getProgress

         double getProgress()

        Calculates the download progress as percentage value.