# Check and Install Updates

The SDK does not automatically update installed regions. The Android application should retrieve the online catalog, compare versions, and ask the user for confirmation:

```kotlin
fun hasUpdate(
    online: OfflineCatalogItem,
    installed: OfflineInstalledRegion,
): Boolean =
    online.version != null &&
        online.version != installed.regionVersion
```

After the user confirms, start a replacement download:

```kotlin
lifecycleScope.launch {
    RegionalOffline.download(
        regionId = regionId,
        clearBefore = true,
    ).onFailure { throwable ->
        renderError(OfflineRegionError.from(throwable))
    }
}
```

`clearBefore = true` clears the old installed manifest entry when the new task starts, then installs the complete package set defined by the current catalog. Do not update installed regions silently, especially during critical flows such as navigation. When a newer version is available, ask the user to confirm the update and explain that the old region data may be temporarily unavailable while the replacement package is installed.
