Stay organized with collections
Save and categorize content based on your preferences.
InstallState
public
abstract
class
InstallState
extends Object
Reports the request state of a module install or update.
To see examples, read Install a flexible
update.
Summary
Inherited methods |
From class
java.lang.Object
boolean
|
equals(Object arg0)
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
Public constructors
InstallState
public InstallState ()
Public methods
installErrorCode
public abstract int installErrorCode ()
Returns the error code for an install, or InstallErrorCode.NO_ERROR
if the install is
successful or in progress.
installStatus
public abstract int installStatus ()
Returns the status of an install.
To see examples, read Install a
flexible update.
packageName
public abstract String packageName ()
Returns the package name for the app being installed.
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()
returns InstallStatus.DOWNLOADING
.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# InstallState\n\nSummary: [Ctors](#pubctors) \\| [Methods](#pubmethods) \\| [Inherited Methods](#inhmethods) \n\nInstallState\n============\n\n\n`\npublic\n\n\nabstract\nclass\nInstallState\n`\n\n\n`\n\nextends `[Object](https://developer.android.com/reference/java/lang/Object.html)`\n\n\n`\n\n`\n\n\n`\n\n|---|---------------------------------------------------|\n| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) ||\n| ↳ | com.google.android.play.core.install.InstallState |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nReports the request state of a module install or update.\n\nTo see examples, read [Install a flexible\nupdate](https://d.android.com/guide/app-bundle/in-app-updates#install_flexible).\n\nSummary\n-------\n\n| ### Public constructors ||\n|------------------------------------------------------------------------------------------------------------------------------|---|\n| ` `[InstallState](../../../../../../../reference/com/google/android/play/core/install/InstallState.html#InstallState())`() ` |\n\n| ### Public methods ||\n|-------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract long` | ` `[bytesDownloaded](../../../../../../../reference/com/google/android/play/core/install/InstallState.html#bytesDownloaded())`() ` Returns the number of bytes downloaded so far. |\n| ` abstract int` | ` `[installErrorCode](../../../../../../../reference/com/google/android/play/core/install/InstallState.html#installErrorCode())`() ` Returns the error code for an install, or [InstallErrorCode.NO_ERROR](../../../../../../../reference/com/google/android/play/core/install/model/InstallErrorCode.html#NO_ERROR) if the install is successful or in progress. |\n| ` abstract int` | ` `[installStatus](../../../../../../../reference/com/google/android/play/core/install/InstallState.html#installStatus())`() ` Returns the status of an install. |\n| ` abstract `[String](https://developer.android.com/reference/java/lang/String.html) | ` `[packageName](../../../../../../../reference/com/google/android/play/core/install/InstallState.html#packageName())`() ` Returns the package name for the app being installed. |\n| ` abstract long` | ` `[totalBytesToDownload](../../../../../../../reference/com/google/android/play/core/install/InstallState.html#totalBytesToDownload())`() ` Returns the total number of bytes to be downloaded for this update. |\n\n| ### Inherited methods |\n|-----------------------|---|\n| 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)`\u003c?\u003e` | ` 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() ` | ||\n\nPublic constructors\n-------------------\n\n### InstallState\n\n```\npublic InstallState ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nPublic methods\n--------------\n\n### bytesDownloaded\n\n```\npublic abstract long bytesDownloaded ()\n```\n\nReturns the number of bytes downloaded so far.\n\nThe return value is defined only if [installStatus()](../../../../../../../reference/com/google/android/play/core/install/InstallState.html#installStatus()) returns [InstallStatus.DOWNLOADING](../../../../../../../reference/com/google/android/play/core/install/model/InstallStatus.html#DOWNLOADING).\n\n\u003cbr /\u003e\n\n| Returns ||\n|--------|--------|\n| `long` | \u003cbr /\u003e |\n\n### installErrorCode\n\n```\npublic abstract int installErrorCode ()\n```\n\nReturns the error code for an install, or [InstallErrorCode.NO_ERROR](../../../../../../../reference/com/google/android/play/core/install/model/InstallErrorCode.html#NO_ERROR) if the install is\nsuccessful or in progress.\n\n\u003cbr /\u003e\n\n| Returns ||\n|-------|-----------------------------------------------------------------------------------------------------------------------------------------|\n| `int` | a value from [InstallErrorCode](../../../../../../../reference/com/google/android/play/core/install/model/InstallErrorCode.html) \u003cbr /\u003e |\n\n### installStatus\n\n```\npublic abstract int installStatus ()\n```\n\nReturns the status of an install.\n\nTo see examples, read [Install a\nflexible update](https://d.android.com/guide/app-bundle/in-app-updates#install_flexible).\n\n\u003cbr /\u003e\n\n| Returns ||\n|-------|-----------------------------------------------------------------------------------------------------------------------------------|\n| `int` | a value from [InstallStatus](../../../../../../../reference/com/google/android/play/core/install/model/InstallStatus.html) \u003cbr /\u003e |\n\n### packageName\n\n```\npublic abstract String packageName ()\n```\n\nReturns the package name for the app being installed.\n\n\u003cbr /\u003e\n\n| Returns ||\n|-------------------------------------------------------------------------|--------|\n| [String](https://developer.android.com/reference/java/lang/String.html) | \u003cbr /\u003e |\n\n### totalBytesToDownload\n\n```\npublic abstract long totalBytesToDownload ()\n```\n\nReturns the total number of bytes to be downloaded for this update.\n\nThe return value is defined only if [installStatus()](../../../../../../../reference/com/google/android/play/core/install/InstallState.html#installStatus()) returns [InstallStatus.DOWNLOADING](../../../../../../../reference/com/google/android/play/core/install/model/InstallStatus.html#DOWNLOADING).\n\n\u003cbr /\u003e\n\n| Returns ||\n|--------|--------|\n| `long` | \u003cbr /\u003e |"]]