DynamicInstallMonitor
class DynamicInstallMonitor
kotlin.Any | |
↳ | androidx.navigation.dynamicfeatures.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 | |
---|---|
<init>() Monitor installation progress of dynamic feature modules. |
Public methods | |
---|---|
Unit |
Cancel the current split installation session in the SplitInstallManager. |
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
<init>
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.
Public methods
cancelInstall
fun cancelInstall(): Unit
Cancel the current split installation session in the SplitInstallManager.
Properties
isInstallRequired
var isInstallRequired: Boolean
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.
Return | |
---|---|
true |
if installation is required, false otherwise. |
status
val status: LiveData<SplitInstallSessionState>
Get a LiveData of SplitInstallSessionStatus with updates on the installation progress.