AiPackState
public
abstract
class
AiPackState
extends Object
| java.lang.Object | |
| ↳ | com.google.android.play.core.aipacks.AiPackState |
The state of an individual AI pack.
Summary
Public constructors | |
|---|---|
AiPackState()
|
|
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 pack already transferred to the app. |
Inherited methods | |
|---|---|
Public constructors
AiPackState
public AiPackState ()
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 AiPackErrorCode.NO_ERROR if the download was successful or is in progress or has not been
attempted.
| Returns | |
|---|---|
int |
A value from AiPackErrorCode.
|
status
public abstract int status ()
Returns the download status of the pack.
If the pack has never been requested before its status is AiPackStatus.UNKNOWN.
| Returns | |
|---|---|
int |
a value from AiPackStatus
|
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 pack already transferred to the app.
This value is only defined when the status is AiPackStatus.TRANSFERRING.
| Returns | |
|---|---|
int |
a value between 0 and 100 inclusive. |