InstallState

public abstract class InstallState
extends Object

java.lang.Object
   ↳ com.google.android.play.core.install.InstallState


Reports the request state of a module install or update.

To see examples, read Install a flexible update.

Summary

Public constructors

InstallState()

Public methods

abstract long bytesDownloaded()

Returns the number of bytes downloaded so far.

abstract int installErrorCode()

Returns the error code for an install, or InstallErrorCode.NO_ERROR if the install is successful or in progress.

abstract int installStatus()

Returns the status of an install.

abstract String packageName()

Returns the package name for the app being installed.

abstract long totalBytesToDownload()

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

Inherited methods

Public constructors

InstallState

public InstallState ()

Public methods

bytesDownloaded

public abstract long bytesDownloaded ()

Returns the number of bytes downloaded so far.

The return value is defined only if installStatus() returns InstallStatus.DOWNLOADING.

Returns
long

installErrorCode

public abstract int installErrorCode ()

Returns the error code for an install, or InstallErrorCode.NO_ERROR if the install is successful or in progress.

Returns
int a value from InstallErrorCode

installStatus

public abstract int installStatus ()

Returns the status of an install.

To see examples, read Install a flexible update.

Returns
int a value from InstallStatus

packageName

public abstract String packageName ()

Returns the package name for the app being installed.

Returns
String

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.

Returns
long