ModuleInstallStatusUpdate

public class ModuleInstallStatusUpdate implements Parcelable


The status update of a ModuleInstallRequest.

Summary

Nested types

@Retention(value = RetentionPolicy.CLASS)
@IntDef(value = [InstallState.STATE_UNKNOWN, InstallState.STATE_PENDING, InstallState.STATE_DOWNLOADING, InstallState.STATE_CANCELED, InstallState.STATE_COMPLETED, InstallState.STATE_FAILED, InstallState.STATE_INSTALLING, InstallState.STATE_DOWNLOAD_PAUSED])
public annotation ModuleInstallStatusUpdate.InstallState

The current install state for the install request.

Download progress information for an ModuleInstallStatusUpdate.

Public methods

int

Returns the error code from ModuleInstallStatusCodes, or SUCCESS if the install is successful or in progress.

int

Returns the InstallState of an optional module install session.

@Nullable ModuleInstallStatusUpdate.ProgressInfo

Returns the download progress information including the bytes downloaded so far and total bytes to download.

int

Returns the session id that corresponding to a ModuleInstallRequest.

void
writeToParcel(Parcel parcel, int i)

Inherited Constants

From android.os.Parcelable
static final int
static final int

Inherited methods

From android.os.Parcelable
abstract int

Constants

CREATOR

public static final Parcelable.Creator<ModuleInstallStatusUpdateCREATOR

Public fields

errorCode

public final int errorCode

installState

@ModuleInstallStatusUpdate.InstallState
public final int installState

sessionId

public final int sessionId

Public methods

getErrorCode

public int getErrorCode()

Returns the error code from ModuleInstallStatusCodes, or SUCCESS if the install is successful or in progress.

getInstallState

@ModuleInstallStatusUpdate.InstallState
public int getInstallState()

Returns the InstallState of an optional module install session.

getProgressInfo

public @Nullable ModuleInstallStatusUpdate.ProgressInfo getProgressInfo()

Returns the download progress information including the bytes downloaded so far and total bytes to download.

When there are modules to download, the progress info would be provided on the following state: STATE_DOWNLOADING, STATE_DOWNLOAD_PAUSED, STATE_INSTALLING and STATE_COMPLETED. Otherwise, this method would return null.

getSessionId

public int getSessionId()

Returns the session id that corresponding to a ModuleInstallRequest.

writeToParcel

public void writeToParcel(Parcel parcel, int i)