# AiPackState

Summary:[Ctors](https://developer.android.com/reference/com/google/android/play/core/aipacks/AiPackState#pubctors)\|[Methods](https://developer.android.com/reference/com/google/android/play/core/aipacks/AiPackState#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/com/google/android/play/core/aipacks/AiPackState#inhmethods)  

# AiPackState

`
public


abstract
class
AiPackState
`  
`

extends `[Object](https://developer.android.com/reference/java/lang/Object.html)`


``


`

|---|--------------------------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) ||
| ↳ | com.google.android.play.core.aipacks.AiPackState |

<br />

*** ** * ** ***

The state of an individual AI pack.

## Summary

|                                                        ### Public constructors                                                        ||
|------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[AiPackState](https://developer.android.com/reference/com/google/android/play/core/aipacks/AiPackState.html#AiPackState())`() ` |

|                                                                                                                                                    ### Public methods                                                                                                                                                    ||
|-------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` abstract long`                                                                    | ` `[bytesDownloaded](https://developer.android.com/reference/com/google/android/play/core/aipacks/AiPackState.html#bytesDownloaded())`() ` Returns the total number of bytes already downloaded for the pack.                       |
| ` abstract int`                                                                     | ` `[errorCode](https://developer.android.com/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.                        |
| ` abstract `[String](https://developer.android.com/reference/java/lang/String.html) | ` `[name](https://developer.android.com/reference/com/google/android/play/core/aipacks/AiPackState.html#name())`() ` Returns the name of the pack.                                                                                  |
| ` abstract int`                                                                     | ` `[status](https://developer.android.com/reference/com/google/android/play/core/aipacks/AiPackState.html#status())`() ` Returns the download status of the pack.                                                                   |
| ` abstract long`                                                                    | ` `[totalBytesToDownload](https://developer.android.com/reference/com/google/android/play/core/aipacks/AiPackState.html#totalBytesToDownload())`() ` Returns the total size of the pack in bytes.                                   |
| ` abstract int`                                                                     | ` `[transferProgressPercentage](https://developer.android.com/reference/com/google/android/play/core/aipacks/AiPackState.html#transferProgressPercentage())`() ` Returns the percentage of the pack already transferred to the app. |

| ### Inherited methods |
|-----------------------|---|
| 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)`<?>` | ` 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() `                                                                                 | ||

## Public constructors

### AiPackState

```
public AiPackState ()
```

<br />

<br />

## Public methods

### bytesDownloaded

```
public abstract long bytesDownloaded ()
```

Returns the total number of bytes already downloaded for the pack.

<br />

|    Returns     ||
|--------|--------|
| `long` | <br /> |

### errorCode

```
public abstract int errorCode ()
```

Returns the error code for the pack, if Play has failed to download the pack. Returns[AiPackErrorCode.NO_ERROR](https://developer.android.com/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 attempted.

<br />

|                                                                        Returns                                                                        ||
|-------|------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | A value from[AiPackErrorCode](https://developer.android.com/reference/com/google/android/play/core/aipacks/model/AiPackErrorCode.html). <br /> |

### name

```
public abstract String name ()
```

Returns the name of the pack.

<br />

|                                     Returns                                     ||
|-------------------------------------------------------------------------|--------|
| [String](https://developer.android.com/reference/java/lang/String.html) | <br /> |

### 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](https://developer.android.com/reference/com/google/android/play/core/aipacks/model/AiPackStatus.html#UNKNOWN).

<br />

|                                                                    Returns                                                                     ||
|-------|-----------------------------------------------------------------------------------------------------------------------------------------|
| `int` | a value from[AiPackStatus](https://developer.android.com/reference/com/google/android/play/core/aipacks/model/AiPackStatus.html) <br /> |

### totalBytesToDownload

```
public abstract long totalBytesToDownload ()
```

Returns the total size of the pack in bytes.

<br />

|    Returns     ||
|--------|--------|
| `long` | <br /> |

### 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](https://developer.android.com/reference/com/google/android/play/core/aipacks/model/AiPackStatus.html#TRANSFERRING).

<br />

|                      Returns                       ||
|-------|---------------------------------------------|
| `int` | a value between 0 and 100 inclusive. <br /> |