SplitInstallSessionState

public abstract class SplitInstallSessionState
extends Object

java.lang.Object
   ↳ com.google.android.play.core.splitinstall.SplitInstallSessionState


The current state of a split install request.

For more information and examples, see Monitor the request state.

Summary

Public constructors

SplitInstallSessionState()

Public methods

abstract long bytesDownloaded()

Returns the number of bytes downloaded so far.

static SplitInstallSessionState create(int sessionId, int status, int errorCode, long bytesDownloaded, long totalBytesToDownload, List<String> moduleNames, List<String> languages)

Creates a SplitInstallSessionState data object.

abstract int errorCode()

Returns the error code for a split install, or NO_ERROR if the install is successful or in progress.

boolean hasTerminalStatus()
List<String> languages()

Returns the languages that are included in this install session.

List<String> moduleNames()

Returns the modules that are included in this install session.

abstract PendingIntent resolutionIntent()

This method is deprecated. please use startConfirmationDialogForResult(SplitInstallSessionState, Activity, int) instead.

abstract int sessionId()
abstract int status()

Returns the status of a split install session.

abstract long totalBytesToDownload()

Returns the total number of bytes to download in this session.

Inherited methods

From class java.lang.Object

Public constructors

SplitInstallSessionState

SplitInstallSessionState ()

Public methods

bytesDownloaded

long bytesDownloaded ()

Returns the number of bytes downloaded so far.

Returns
long

create

SplitInstallSessionState create (int sessionId, 
                int status, 
                int errorCode, 
                long bytesDownloaded, 
                long totalBytesToDownload, 
                List<String> moduleNames, 
                List<String> languages)

Creates a SplitInstallSessionState data object.

This method cannot be used to create states in the REQUIRES_USER_CONFIRMATION state.

Parameters
sessionId int

status int

errorCode int

bytesDownloaded long

totalBytesToDownload long

moduleNames List

languages List

Returns
SplitInstallSessionState

errorCode

int errorCode ()

Returns the error code for a split install, or NO_ERROR if the install is successful or in progress.

Returns
int a value from SplitInstallErrorCode

hasTerminalStatus

boolean hasTerminalStatus ()

Returns
boolean

languages

List<String> languages ()

Returns the languages that are included in this install session.

Returns
List<String> The list of languages or an empty list.

moduleNames

List<String> moduleNames ()

Returns the modules that are included in this install session.

Returns
List<String> The list of modules or an empty list.

resolutionIntent

PendingIntent resolutionIntent ()

This method is deprecated.
please use startConfirmationDialogForResult(SplitInstallSessionState, Activity, int) instead.

Returns
PendingIntent

sessionId

int sessionId ()

Returns
int

status

int status ()

Returns the status of a split install session.

Returns
int a value from SplitInstallSessionStatus

totalBytesToDownload

long totalBytesToDownload ()

Returns the total number of bytes to download in this session.

Returns
long