RegionState
class RegionState(val installState: RegionInstallState, val updateState: RegionUpdateState?, val dataInfo: RegionDataInfo?)
The state of an updatable Region.
This combines:
what is already installed on the device (installState)
whether newer data can be downloaded and the estimated size (updateState)
details about the installed data when available (dataInfo)
UI guidance
A typical UI can be derived from this object as follows:
If installState is RegionInstallState.Inconsistent, show a warning and offer a Repair (re-download) action.
Else if updateState?.RegionUpdateState.downloadAvailable is
true:show Download when installState is RegionInstallState.NotInstalled
show Update and Delete when the region is installed
optionally show RegionUpdateState.downloadSize
Else, consider showing "Up to date" and enable Delete only when installed.
Note: Only updatable Regions have a RegionState.
Constructors
Link copied to clipboard
constructor(installState: RegionInstallState, updateState: RegionUpdateState?, dataInfo: RegionDataInfo?)