AndroidOfflineMapsManager

class AndroidOfflineMapsManager(appContext: Context, soundscapeServiceConnection: SoundscapeServiceConnection)

Session-scope facade over the offline-map manifest fetcher, file system index, and OfflineDownloader. Implements the surface area the shared NavGraph expects on iOS via OfflineMapManager: full list of manifest extracts, downloaded extracts as a FeatureCollection, current download state, and refresh / containing-query / start / cancel / delete operations.

Constructors

Link copied to clipboard
constructor(appContext: Context, soundscapeServiceConnection: SoundscapeServiceConnection)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val downloadedExtractsFc: StateFlow<FeatureCollection>
Link copied to clipboard
val downloadState: StateFlow<DownloadStateCommon>
Link copied to clipboard
val nearbyExtractsState: StateFlow<NearbyExtractsState>

Functions

Link copied to clipboard
Link copied to clipboard
fun deleteExtractByFeature(feature: Feature)
Link copied to clipboard
fun getExtractsContaining(location: LngLatAlt): List<Feature>
Link copied to clipboard
fun refresh()
Link copied to clipboard
fun startDownload(name: String, feature: Feature)

Download feature, which is either a manifest entry the user picked from the nearby list, or - when they pressed "Update" - the entry a downloaded extract was originally fetched with. In the latter case its filename carries the build prefix of whichever manifest it came from, and that build has usually been replaced on the server by now, so the download is always made against the current manifest entry where there is one.