AppUpdateInfo

public final class AppUpdateInfo
extends Object

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


Information about install/update availability and progress for a package.

Summary

Public constructors

AppUpdateInfo(String packageName, int availableVersionCode, int updateAvailability, int installStatus, PendingIntent immediateUpdateIntent, PendingIntent flexibleUpdateIntent)

Public methods

int availableVersionCode()

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

int installStatus()

If updateAvailability() is DEVELOPER_TRIGGERED_UPDATE_IN_PROGRESS, it returns the install/update progress status.

boolean isUpdateTypeAllowed(int updateType)

Returns whether the desired update type is allowed.

String packageName()
int updateAvailability()

Inherited methods

From class java.lang.Object

Public constructors

AppUpdateInfo

AppUpdateInfo (String packageName, 
                int availableVersionCode, 
                int updateAvailability, 
                int installStatus, 
                PendingIntent immediateUpdateIntent, 
                PendingIntent flexibleUpdateIntent)

Parameters
packageName String

availableVersionCode int

updateAvailability int

installStatus int

immediateUpdateIntent PendingIntent

flexibleUpdateIntent PendingIntent

Public methods

availableVersionCode

int availableVersionCode ()

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

Returns an arbitrary value in case no updates are available.

Returns
int

installStatus

int installStatus ()

If updateAvailability() is DEVELOPER_TRIGGERED_UPDATE_IN_PROGRESS, it returns the install/update progress status.

Returns
int

isUpdateTypeAllowed

boolean isUpdateTypeAllowed (int updateType)

Returns whether the desired update type is allowed.

Parameters
updateType int

Returns
boolean

packageName

String packageName ()

Returns
String

updateAvailability

int updateAvailability ()

Returns
int