AssetPackState
  public
  
  
  abstract
  class
  AssetPackState
  
    extends Object
  
  
  
  
  
  
| java.lang.Object | |
| ↳ | com.google.android.play.core.assetpacks.AssetPackState | 
The state of an individual asset pack.
Summary
Public constructors | |
|---|---|
      
      AssetPackState()
      
      
     | 
  |
Public methods | |
|---|---|
        abstract
        
        
        
        
        long
     | 
  
    
      
      bytesDownloaded()
      
      
        Returns the total number of bytes already downloaded for the pack.  | 
  
        abstract
        
        
        
        
        int
     | 
  
    
      
      errorCode()
      
      
        Returns the error code for the pack, if Play has failed to download the pack.  | 
  
        abstract
        
        
        
        
        String
     | 
  
    
      
      name()
      
      
        Returns the name of the pack.  | 
  
        abstract
        
        
        
        
        int
     | 
  
    
      
      status()
      
      
        Returns the download status of the pack.  | 
  
        abstract
        
        
        
        
        long
     | 
  
    
      
      totalBytesToDownload()
      
      
        Returns the total size of the pack in bytes.  | 
  
        abstract
        
        
        
        
        int
     | 
  
    
      
      transferProgressPercentage()
      
      
        Returns the percentage of the asset pack already transferred to the app.  | 
  
Inherited methods | |
|---|---|
Public constructors
AssetPackState
public AssetPackState ()
Public methods
bytesDownloaded
public abstract long bytesDownloaded ()
Returns the total number of bytes already downloaded for the pack.
| Returns | |
|---|---|
long | 
        |
errorCode
public abstract int errorCode ()
Returns the error code for the pack, if Play has failed to download the pack. Returns AssetPackErrorCode.NO_ERROR if the download was successful or is in progress or has not been
 attempted.
| Returns | |
|---|---|
int | 
        A value from AssetPackErrorCode.
 | 
      
status
public abstract int status ()
Returns the download status of the pack.
If the pack has never been requested before its status is AssetPackStatus.UNKNOWN.
| Returns | |
|---|---|
int | 
        a value from AssetPackStatus
 | 
      
totalBytesToDownload
public abstract long totalBytesToDownload ()
Returns the total size of the pack in bytes.
| Returns | |
|---|---|
long | 
        |
transferProgressPercentage
public abstract int transferProgressPercentage ()
Returns the percentage of the asset pack already transferred to the app.
This value is only defined when the status is AssetPackStatus.TRANSFERRING.
| Returns | |
|---|---|
int | 
        a value between 0 and 100 inclusive. |