DynamicInstallMonitor
public final 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 fields |
|
|---|---|
final @NonNull Exception |
The occurred exception, if any. |
final boolean |
Check whether an installation is required. |
final int |
The session id from Play Core for this installation session. |
final @NonNull LiveData<@NonNull SplitInstallSessionState> |
Get a LiveData of |
Public constructors |
|
|---|---|
Public methods |
|
|---|---|
final void |
Cancel the current split installation session in the SplitInstallManager. |
Public fields
isInstallRequired
@NonNull
public final boolean isInstallRequired
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 |
|
sessionId
@NonNull
public final int sessionId
The session id from Play Core for this installation session.
status
@NonNull
public final @NonNull LiveData<@NonNull SplitInstallSessionState> status
Get a LiveData of SplitInstallSessionStatus with updates on the installation progress.
Public constructors
Public methods
cancelInstall
@NonNull
public final void cancelInstall()
Cancel the current split installation session in the SplitInstallManager.