android-components / mozilla.components.service.location / MozillaLocationService / fetchRegion

fetchRegion

suspend fun fetchRegion(readFromCache: Boolean): Region? (source)

Overrides LocationService.fetchRegion

Determines the current LocationService.Region based on the IP address used to access the service.

https://mozilla.github.io/ichnaea/api/region.html

Parameters

readFromCache - Whether a previously returned region (from the cache) can be returned (default) or whether a request to the service should always be made.