Package-level declarations

Country detection from device signals: the CountryDetector interface, DefaultCountryDetector (SIM → network → locale, no location permission), and the result/behavior types that describe what the picker does with a detected country.

Country detection from device signals: the CountryDetector interface, DefaultCountryDetector (SIM → network → locale, no location permission), and the result/behavior types that describe what the picker does with a detected country.

Country detection from device signals: the CountryDetector interface, DefaultCountryDetector (SIM → network → locale, no location permission), and the result/behavior types that describe what the picker does with a detected country.

Types

Link copied to clipboard

What the picker should do with a detection result.

Link copied to clipboard

Outcome of a CountryDetector run.

Link copied to clipboard

Where a detected country came from.

Link copied to clipboard
fun interface CountryDetector

Resolves the user's likely country.

Link copied to clipboard

Detects the country from device signals only: SIM → network → locale settings.

Functions

Link copied to clipboard
fun DefaultCountryDetector(context: Context, fallbackIso2Code: String? = DefaultCountryDetector.DEFAULT_FALLBACK_ISO2_CODE): DefaultCountryDetector

Creates a DefaultCountryDetector reading SIM → network → configuration locale → default locale.

fun DefaultCountryDetector(fallbackIso2Code: String? = DefaultCountryDetector.DEFAULT_FALLBACK_ISO2_CODE): DefaultCountryDetector

Creates a DefaultCountryDetector reading the user's Region setting.

Link copied to clipboard
fun rememberDefaultCountryDetector(fallbackIso2Code: String? = DefaultCountryDetector.DEFAULT_FALLBACK_ISO2_CODE): CountryDetector

Creates and remembers the platform's DefaultCountryDetector.

Link copied to clipboard
fun staticCountryDetector(iso2Code: String, source: CountryDetectionSource = CountryDetectionSource.Default): CountryDetector

A detector that always reports iso2Code. Useful in previews and tests.

Link copied to clipboard

Builds a detector that tries the receiver first and falls back to fallback when it yields nothing.