class DynamicInstallMonitor


Monitor installation progress of dynamic feature modules. This class enables you to subscribe to the current installation state via getStatus. You also can perform various checks on installation state directly through this monitor.

In order to enable installation and monitoring of progress you'll have to provide an instance of this class to DynamicExtras.

Summary

Public constructors

Public functions

Unit

Cancel the current split installation session in the SplitInstallManager.

Public properties

Exception?

The occurred exception, if any.

Boolean

Check whether an installation is required.

Int

The session id from Play Core for this installation session.

LiveData<SplitInstallSessionState>

Get a LiveData of SplitInstallSessionStatus with updates on the installation progress.

Public constructors

DynamicInstallMonitor

Added in 2.3.0
DynamicInstallMonitor()

Public functions

cancelInstall

Added in 2.3.0
fun cancelInstall(): Unit

Cancel the current split installation session in the SplitInstallManager.

Public properties

exception

Added in 2.3.0
val exceptionException?

The occurred exception, if any.

isInstallRequired

Added in 2.3.0
val isInstallRequiredBoolean

Check whether an installation is required.

If this returns true, you should observe the LiveData returned by status for installation updates and handle them accordingly.

Returns
Boolean

true if installation is required, false otherwise.

sessionId

Added in 2.3.0
val sessionIdInt

The session id from Play Core for this installation session.

status

Added in 2.3.0
val statusLiveData<SplitInstallSessionState>

Get a LiveData of SplitInstallSessionStatus with updates on the installation progress.