com.amazon.InAppSDK.purchasing
Class ContentDownloadResponse

java.lang.Object
  extended by com.amazon.InAppSDK.purchasing.ContentDownloadResponse

public final class ContentDownloadResponse
extends java.lang.Object

Represents the result of a call to PurchasingManager.initiateContentDownloadRequest(String, String) and is sent asynchronously to the registered PurchasingObserver via PurchasingObserver.notifyContentDownloadResponse(ContentDownloadResponse). It's possible to receive more than one ContentDownloadResponse for a given request, each with a different percentage complete.


Nested Class Summary
static class ContentDownloadResponse.ContentDownloadRequestStatus
          Indicates the result of a content download request initiated via PurchasingManager.initiateContentDownloadRequest(String, String).
 
Method Summary
 ContentDownloadResponse.ContentDownloadRequestStatus getContentDownloadRequestStatus()
          Returns the status of the download operation.
 int getPercentComplete()
          Returns the current percentage complete for the download.
 java.lang.String getRequestId()
          Provides access to the request ID originally returned by PurchasingManager.initiateContentDownloadRequest(String, String).
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getRequestId

public java.lang.String getRequestId()
Provides access to the request ID originally returned by PurchasingManager.initiateContentDownloadRequest(String, String). This identifier can be used to correlate the original request with this response.

Returns:
the ID of the request that this response is associated with

getPercentComplete

public int getPercentComplete()
Returns the current percentage complete for the download.

Returns:
The current percentage complete for the download

getContentDownloadRequestStatus

public ContentDownloadResponse.ContentDownloadRequestStatus getContentDownloadRequestStatus()
Returns the status of the download operation. If this is ContentDownloadResponse.ContentDownloadRequestStatus.InProgress then you can expect another response at some point in the future with a status of ContentDownloadResponse.ContentDownloadRequestStatus.Complete. If this is not ContentDownloadResponse.ContentDownloadRequestStatus.InProgress, then this is the last response you will receive for this operation.

Returns:
the status of the download operation