The Android Developer Challenge is back! Submit your idea before December 2.

AppUpdateInfo

public abstract class AppUpdateInfo
extends Object

java.lang.Object
   ↳ com.google.android.play.core.appupdate.AppUpdateInfo


Contains information about the avilability and progress of an app update.

To learn more, see support in-app updates.

Summary

Public constructors

AppUpdateInfo()

Public methods

abstract int availableVersionCode()

If an update is available or in progress, this method returns the version code of the update.

abstract int installStatus()

Returns the progress status of the update.

boolean isUpdateTypeAllowed(int updateType)

Returns whether the desired update type, such as flexible or immediate, is allowed.

abstract String packageName()

Returns the package name for the app to be updated.

abstract int updateAvailability()

Returns whether an update is available for the app.

Inherited methods

From class java.lang.Object

Public constructors

AppUpdateInfo

AppUpdateInfo ()

Public methods

availableVersionCode

int availableVersionCode ()

If an update is available or in progress, this method returns the version code of the update.

If no updates are available, this method returns an arbitrary value.

Returns
int

installStatus

int installStatus ()

Returns the progress status of the update.

The return value is defined only if updateAvailability() returns DEVELOPER_TRIGGERED_UPDATE_IN_PROGRESS.

To see examples, go to Install a flexible update.

Returns
int a value from InstallStatus

isUpdateTypeAllowed

boolean isUpdateTypeAllowed (int updateType)

Returns whether the desired update type, such as flexible or immediate, is allowed.

To learn more, read Check for update availability.

Parameters
updateType int: a value from AppUpdateType

Returns
boolean

packageName

String packageName ()

Returns the package name for the app to be updated.

Returns
String

updateAvailability

int updateAvailability ()

Returns whether an update is available for the app.

To learn more, read Check for update availability.

Returns
int a value from UpdateAvailability