# AssetPackState

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

# AssetPackState

`
public


abstract
class
AssetPackState
`  
`

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.assetpacks.AssetPackState |

<br />

*** ** * ** ***

The state of an individual asset pack.

## Summary

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

|                                                                                                                                                          ### Public methods                                                                                                                                                          ||
|-------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` abstract long`                                                                    | ` `[bytesDownloaded](https://developer.android.com/reference/com/google/android/play/core/assetpacks/AssetPackState.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/assetpacks/AssetPackState.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/assetpacks/AssetPackState.html#name())`() ` Returns the name of the pack.                                                                                        |
| ` abstract int`                                                                     | ` `[status](https://developer.android.com/reference/com/google/android/play/core/assetpacks/AssetPackState.html#status())`() ` Returns the download status of the pack.                                                                         |
| ` abstract long`                                                                    | ` `[totalBytesToDownload](https://developer.android.com/reference/com/google/android/play/core/assetpacks/AssetPackState.html#totalBytesToDownload())`() ` Returns the total size of the pack in bytes.                                         |
| ` abstract int`                                                                     | ` `[transferProgressPercentage](https://developer.android.com/reference/com/google/android/play/core/assetpacks/AssetPackState.html#transferProgressPercentage())`() ` Returns the percentage of the asset 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

### AssetPackState

```
public AssetPackState ()
```

<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[AssetPackErrorCode.NO_ERROR](https://developer.android.com/reference/com/google/android/play/core/assetpacks/model/AssetPackErrorCode.html#NO_ERROR)if the download was successful or is in progress or has not been attempted.

<br />

|                                                                            Returns                                                                             ||
|-------|---------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | A value from[AssetPackErrorCode](https://developer.android.com/reference/com/google/android/play/core/assetpacks/model/AssetPackErrorCode.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[AssetPackStatus.UNKNOWN](https://developer.android.com/reference/com/google/android/play/core/assetpacks/model/AssetPackStatus.html#UNKNOWN).

<br />

|                                                                         Returns                                                                         ||
|-------|--------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | a value from[AssetPackStatus](https://developer.android.com/reference/com/google/android/play/core/assetpacks/model/AssetPackStatus.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 asset pack already transferred to the app.

This value is only defined when the status is[AssetPackStatus.TRANSFERRING](https://developer.android.com/reference/com/google/android/play/core/assetpacks/model/AssetPackStatus.html#TRANSFERRING).

<br />

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