Stay organized with collections
Save and categorize content based on your preferences.
AiPackState
public
abstract
class
AiPackState
extends Object
The state of an individual AI pack.
Summary
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 |
From class
java.lang.Object
boolean
|
equals(Object arg0)
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
Public constructors
AiPackState
public AiPackState ()
Public methods
bytesDownloaded
public abstract long bytesDownloaded ()
Returns the total number of bytes already downloaded for the pack.
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.
name
public abstract String name ()
Returns the name of the pack.
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
.
totalBytesToDownload
public abstract long totalBytesToDownload ()
Returns the total size of the pack in bytes.
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.
|
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# AiPackState\n\nSummary: [Ctors](#pubctors) \\| [Methods](#pubmethods) \\| [Inherited Methods](#inhmethods) \n\nAiPackState\n===========\n\n\n`\npublic\n\n\nabstract\nclass\nAiPackState\n`\n\n\n`\n\nextends `[Object](https://developer.android.com/reference/java/lang/Object.html)`\n\n\n`\n\n`\n\n\n`\n\n|---|--------------------------------------------------|\n| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) ||\n| ↳ | com.google.android.play.core.aipacks.AiPackState |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nThe state of an individual AI pack.\n\nSummary\n-------\n\n| ### Public constructors ||\n|---------------------------------------------------------------------------------------------------------------------------|---|\n| ` `[AiPackState](../../../../../../../reference/com/google/android/play/core/aipacks/AiPackState.html#AiPackState())`() ` |\n\n| ### Public methods ||\n|-------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract long` | ` `[bytesDownloaded](../../../../../../../reference/com/google/android/play/core/aipacks/AiPackState.html#bytesDownloaded())`() ` Returns the total number of bytes already downloaded for the pack. |\n| ` abstract int` | ` `[errorCode](../../../../../../../reference/com/google/android/play/core/aipacks/AiPackState.html#errorCode())`() ` Returns the error code for the pack, if Play has failed to download the pack. |\n| ` abstract `[String](https://developer.android.com/reference/java/lang/String.html) | ` `[name](../../../../../../../reference/com/google/android/play/core/aipacks/AiPackState.html#name())`() ` Returns the name of the pack. |\n| ` abstract int` | ` `[status](../../../../../../../reference/com/google/android/play/core/aipacks/AiPackState.html#status())`() ` Returns the download status of the pack. |\n| ` abstract long` | ` `[totalBytesToDownload](../../../../../../../reference/com/google/android/play/core/aipacks/AiPackState.html#totalBytesToDownload())`() ` Returns the total size of the pack in bytes. |\n| ` abstract int` | ` `[transferProgressPercentage](../../../../../../../reference/com/google/android/play/core/aipacks/AiPackState.html#transferProgressPercentage())`() ` Returns the percentage of the pack already transferred to the app. |\n\n| ### Inherited methods |\n|-----------------------|---|\n| From class ` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object.html)` ` |-------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------| | ` boolean` | ` equals(`[Object](https://developer.android.com/reference/java/lang/Object.html)` arg0) ` | | ` final `[Class](https://developer.android.com/reference/java/lang/Class.html)`\u003c?\u003e` | ` getClass() ` | | ` int` | ` hashCode() ` | | ` final void` | ` notify() ` | | ` final void` | ` notifyAll() ` | | ` `[String](https://developer.android.com/reference/java/lang/String.html) | ` toString() ` | | ` final void` | ` wait(long arg0, int arg1) ` | | ` final void` | ` wait(long arg0) ` | | ` final void` | ` wait() ` | ||\n\nPublic constructors\n-------------------\n\n### AiPackState\n\n```\npublic AiPackState ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nPublic methods\n--------------\n\n### bytesDownloaded\n\n```\npublic abstract long bytesDownloaded ()\n```\n\nReturns the total number of bytes already downloaded for the pack.\n\n\u003cbr /\u003e\n\n| Returns ||\n|--------|--------|\n| `long` | \u003cbr /\u003e |\n\n### errorCode\n\n```\npublic abstract int errorCode ()\n```\n\nReturns the error code for the pack, if Play has failed to download the pack. Returns [AiPackErrorCode.NO_ERROR](../../../../../../../reference/com/google/android/play/core/aipacks/model/AiPackErrorCode.html#NO_ERROR) if the download was successful or is in progress or has not been\nattempted.\n\n\u003cbr /\u003e\n\n| Returns ||\n|-------|----------------------------------------------------------------------------------------------------------------------------------------|\n| `int` | A value from [AiPackErrorCode](../../../../../../../reference/com/google/android/play/core/aipacks/model/AiPackErrorCode.html). \u003cbr /\u003e |\n\n### name\n\n```\npublic abstract String name ()\n```\n\nReturns the name of the pack.\n\n\u003cbr /\u003e\n\n| Returns ||\n|-------------------------------------------------------------------------|--------|\n| [String](https://developer.android.com/reference/java/lang/String.html) | \u003cbr /\u003e |\n\n### status\n\n```\npublic abstract int status ()\n```\n\nReturns the download status of the pack.\n\nIf the pack has never been requested before its status is [AiPackStatus.UNKNOWN](../../../../../../../reference/com/google/android/play/core/aipacks/model/AiPackStatus.html#UNKNOWN).\n\n\u003cbr /\u003e\n\n| Returns ||\n|-------|---------------------------------------------------------------------------------------------------------------------------------|\n| `int` | a value from [AiPackStatus](../../../../../../../reference/com/google/android/play/core/aipacks/model/AiPackStatus.html) \u003cbr /\u003e |\n\n### totalBytesToDownload\n\n```\npublic abstract long totalBytesToDownload ()\n```\n\nReturns the total size of the pack in bytes.\n\n\u003cbr /\u003e\n\n| Returns ||\n|--------|--------|\n| `long` | \u003cbr /\u003e |\n\n### transferProgressPercentage\n\n```\npublic abstract int transferProgressPercentage ()\n```\n\nReturns the percentage of the pack already transferred to the app.\n\nThis value is only defined when the status is [AiPackStatus.TRANSFERRING](../../../../../../../reference/com/google/android/play/core/aipacks/model/AiPackStatus.html#TRANSFERRING).\n\n\u003cbr /\u003e\n\n| Returns ||\n|-------|---------------------------------------------|\n| `int` | a value between 0 and 100 inclusive. \u003cbr /\u003e |"]]