# InstallState

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

# InstallState

`
public


abstract
class
InstallState
`  
`

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.install.InstallState |

<br />

*** ** * ** ***

Reports the request state of a module install or update.

To see examples, read[Install a flexible update](https://d.android.com/guide/app-bundle/in-app-updates#install_flexible).

## Summary

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

|                                                                                                                                                                                                                           ### Public methods                                                                                                                                                                                                                           ||
|-------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` abstract long`                                                                    | ` `[bytesDownloaded](https://developer.android.com/reference/com/google/android/play/core/install/InstallState.html#bytesDownloaded())`() ` Returns the number of bytes downloaded so far.                                                                                                                                                                                        |
| ` abstract int`                                                                     | ` `[installErrorCode](https://developer.android.com/reference/com/google/android/play/core/install/InstallState.html#installErrorCode())`() ` Returns the error code for an install, or[InstallErrorCode.NO_ERROR](https://developer.android.com/reference/com/google/android/play/core/install/model/InstallErrorCode.html#NO_ERROR)if the install is successful or in progress. |
| ` abstract int`                                                                     | ` `[installStatus](https://developer.android.com/reference/com/google/android/play/core/install/InstallState.html#installStatus())`() ` Returns the status of an install.                                                                                                                                                                                                         |
| ` abstract `[String](https://developer.android.com/reference/java/lang/String.html) | ` `[packageName](https://developer.android.com/reference/com/google/android/play/core/install/InstallState.html#packageName())`() ` Returns the package name for the app being installed.                                                                                                                                                                                         |
| ` abstract long`                                                                    | ` `[totalBytesToDownload](https://developer.android.com/reference/com/google/android/play/core/install/InstallState.html#totalBytesToDownload())`() ` Returns the total number of bytes to be downloaded for this update.                                                                                                                                                         |

| ### 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

### InstallState

```
public InstallState ()
```

<br />

<br />

## Public methods

### bytesDownloaded

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

Returns the number of bytes downloaded so far.

The return value is defined only if[installStatus()](https://developer.android.com/reference/com/google/android/play/core/install/InstallState.html#installStatus())returns[InstallStatus.DOWNLOADING](https://developer.android.com/reference/com/google/android/play/core/install/model/InstallStatus.html#DOWNLOADING).

<br />

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

### installErrorCode

```
public abstract int installErrorCode ()
```

Returns the error code for an install, or[InstallErrorCode.NO_ERROR](https://developer.android.com/reference/com/google/android/play/core/install/model/InstallErrorCode.html#NO_ERROR)if the install is successful or in progress.

<br />

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

### installStatus

```
public abstract int installStatus ()
```

Returns the status of an install.

To see examples, read[Install a flexible update](https://d.android.com/guide/app-bundle/in-app-updates#install_flexible).

<br />

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

### packageName

```
public abstract String packageName ()
```

Returns the package name for the app being installed.

<br />

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

### totalBytesToDownload

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

Returns the total number of bytes to be downloaded for this update.

The return value is defined only if[installStatus()](https://developer.android.com/reference/com/google/android/play/core/install/InstallState.html#installStatus())returns[InstallStatus.DOWNLOADING](https://developer.android.com/reference/com/google/android/play/core/install/model/InstallStatus.html#DOWNLOADING).

<br />

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