# UpdatePrecondition

Summary:[Constants](https://developer.android.com/reference/com/google/android/play/core/install/model/UpdatePrecondition#constants)\|[Inherited Methods](https://developer.android.com/reference/com/google/android/play/core/install/model/UpdatePrecondition#inhmethods)  

# UpdatePrecondition

`
public


abstract
@interface
UpdatePrecondition
`  
`


implements

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


`

|---------------------------------------------------------------|
| com.google.android.play.core.install.model.UpdatePrecondition |

<br />

*** ** * ** ***

Conditions related to an available update that may prevent the immediate execution of certain AppUpdateTypes.

## Summary

|                                                                                                            ### Constants                                                                                                            ||
|-------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | [APP_VERSION_FRESH](https://developer.android.com/reference/com/google/android/play/core/install/model/UpdatePrecondition.html#APP_VERSION_FRESH) The app has already been updated recently.                                 |
| `int` | [CANNOT_DISPLAY](https://developer.android.com/reference/com/google/android/play/core/install/model/UpdatePrecondition.html#CANNOT_DISPLAY) The app cannot display the In-App Update dialog at the moment.                   |
| `int` | [DEVICE_STATUS](https://developer.android.com/reference/com/google/android/play/core/install/model/UpdatePrecondition.html#DEVICE_STATUS) The current device status does not allow an update.                                |
| `int` | [INSUFFICIENT_STORAGE](https://developer.android.com/reference/com/google/android/play/core/install/model/UpdatePrecondition.html#INSUFFICIENT_STORAGE) There is not enough storage on the device to update the application. |
| `int` | [NEED_STORE_TO_PROCEED](https://developer.android.com/reference/com/google/android/play/core/install/model/UpdatePrecondition.html#NEED_STORE_TO_PROCEED) The app can only be updated within the Play Store.                 |
| `int` | [UNKNOWN](https://developer.android.com/reference/com/google/android/play/core/install/model/UpdatePrecondition.html#UNKNOWN) <br />                                                                                         |

| ### Inherited methods |
|-----------------------|---|
| From interface` `[java.lang.annotation.Annotation](https://developer.android.com/reference/java/lang/annotation/Annotation.html)` ` |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------| | ` abstract `[Class](https://developer.android.com/reference/java/lang/Class.html)`<? extends `[Annotation](https://developer.android.com/reference/java/lang/annotation/Annotation.html)`>` | ` annotationType() `                                                                       | | ` abstract boolean`                                                                                                                                                                         | ` equals(`[Object](https://developer.android.com/reference/java/lang/Object.html)` arg0) ` | | ` abstract int`                                                                                                                                                                             | ` hashCode() `                                                                             | | ` abstract `[String](https://developer.android.com/reference/java/lang/String.html)                                                                                                         | ` toString() `                                                                             | ||

## Constants

### APP_VERSION_FRESH

```
public static final int APP_VERSION_FRESH
```

The app has already been updated recently.

<br />

Constant Value: 5 (0x00000005)  

### CANNOT_DISPLAY

```
public static final int CANNOT_DISPLAY
```

The app cannot display the In-App Update dialog at the moment. E.g. the app might be in the background.

<br />

Constant Value: 1 (0x00000001)  

### DEVICE_STATUS

```
public static final int DEVICE_STATUS
```

The current device status does not allow an update. E.g. the battery is too low.

<br />

Constant Value: 4 (0x00000004)  

### INSUFFICIENT_STORAGE

```
public static final int INSUFFICIENT_STORAGE
```

There is not enough storage on the device to update the application.

<br />

Constant Value: 3 (0x00000003)  

### NEED_STORE_TO_PROCEED

```
public static final int NEED_STORE_TO_PROCEED
```

The app can only be updated within the Play Store.

<br />

Constant Value: 2 (0x00000002)  

### UNKNOWN

```
public static final int UNKNOWN
```

<br />

<br />

Constant Value: 0 (0x00000000)