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