Stay organized with collections
Save and categorize content based on your preferences.
UpdatePrecondition
public
abstract
@interface
UpdatePrecondition
implements
Annotation
com.google.android.play.core.install.model.UpdatePrecondition
|
Conditions related to an available update that may prevent the immediate execution of certain
AppUpdateTypes.
Summary
Constants
APP_VERSION_FRESH
public static final int APP_VERSION_FRESH
The app has already been updated recently.
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.
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.
Constant Value:
4
(0x00000004)
INSUFFICIENT_STORAGE
public static final int INSUFFICIENT_STORAGE
There is not enough storage on the device to update the application.
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.
Constant Value:
2
(0x00000002)
UNKNOWN
public static final int UNKNOWN
Constant Value:
0
(0x00000000)
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,["# UpdatePrecondition\n\nSummary: [Constants](#constants) \\| [Inherited Methods](#inhmethods) \n\nUpdatePrecondition\n==================\n\n\n`\npublic\n\n\nabstract\n@interface\nUpdatePrecondition\n`\n\n\n`\n\n\nimplements\n\n`[Annotation](https://developer.android.com/reference/java/lang/annotation/Annotation.html)`\n\n\n`\n\n|---------------------------------------------------------------|\n| com.google.android.play.core.install.model.UpdatePrecondition |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nConditions related to an available update that may prevent the immediate execution of certain\nAppUpdateTypes.\n\nSummary\n-------\n\n| ### Constants ||\n|-------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `int` | [APP_VERSION_FRESH](../../../../../../../../reference/com/google/android/play/core/install/model/UpdatePrecondition.html#APP_VERSION_FRESH) The app has already been updated recently. |\n| `int` | [CANNOT_DISPLAY](../../../../../../../../reference/com/google/android/play/core/install/model/UpdatePrecondition.html#CANNOT_DISPLAY) The app cannot display the In-App Update dialog at the moment. |\n| `int` | [DEVICE_STATUS](../../../../../../../../reference/com/google/android/play/core/install/model/UpdatePrecondition.html#DEVICE_STATUS) The current device status does not allow an update. |\n| `int` | [INSUFFICIENT_STORAGE](../../../../../../../../reference/com/google/android/play/core/install/model/UpdatePrecondition.html#INSUFFICIENT_STORAGE) There is not enough storage on the device to update the application. |\n| `int` | [NEED_STORE_TO_PROCEED](../../../../../../../../reference/com/google/android/play/core/install/model/UpdatePrecondition.html#NEED_STORE_TO_PROCEED) The app can only be updated within the Play Store. |\n| `int` | [UNKNOWN](../../../../../../../../reference/com/google/android/play/core/install/model/UpdatePrecondition.html#UNKNOWN) |\n\n| ### Inherited methods |\n|-----------------------|---|\n| 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)`\u003c? extends `[Annotation](https://developer.android.com/reference/java/lang/annotation/Annotation.html)`\u003e` | ` 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() ` | ||\n\nConstants\n---------\n\n### APP_VERSION_FRESH\n\n```\npublic static final int APP_VERSION_FRESH\n```\n\nThe app has already been updated recently.\n\n\u003cbr /\u003e\n\nConstant Value:\n\n5\n(0x00000005)\n\n\n### CANNOT_DISPLAY\n\n```\npublic static final int CANNOT_DISPLAY\n```\n\nThe app cannot display the In-App Update dialog at the moment. E.g. the app might be in the\nbackground.\n\n\u003cbr /\u003e\n\nConstant Value:\n\n1\n(0x00000001)\n\n\n### DEVICE_STATUS\n\n```\npublic static final int DEVICE_STATUS\n```\n\nThe current device status does not allow an update. E.g. the battery is too low.\n\n\u003cbr /\u003e\n\nConstant Value:\n\n4\n(0x00000004)\n\n\n### INSUFFICIENT_STORAGE\n\n```\npublic static final int INSUFFICIENT_STORAGE\n```\n\nThere is not enough storage on the device to update the application.\n\n\u003cbr /\u003e\n\nConstant Value:\n\n3\n(0x00000003)\n\n\n### NEED_STORE_TO_PROCEED\n\n```\npublic static final int NEED_STORE_TO_PROCEED\n```\n\nThe app can only be updated within the Play Store.\n\n\u003cbr /\u003e\n\nConstant Value:\n\n2\n(0x00000002)\n\n\n### UNKNOWN\n\n```\npublic static final int UNKNOWN\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nConstant Value:\n\n0\n(0x00000000)"]]