LocalizationSettingsService

Localization settings service to interact with localization related settings. Clients can, for instance, change the system locale, or get the activeTemperatureDisplayUnit to know if the temperature values should be displayed using degrees Celsius or Fahrenheit.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Currently active distance measurement system.

Link copied to clipboard
abstract val activeTemperatureDisplayUnit: Temperature.Unit

Currently active temperature display units.

Link copied to clipboard

Currently active time formatting system.

Functions

Link copied to clipboard
abstract suspend fun setActiveDistanceMeasurementSystem(distanceMeasurementSystem: DistanceMeasurementSystem)

Sets the active distance measurement system.

Link copied to clipboard
abstract suspend fun setActiveTemperatureDisplayUnit(temperatureDisplayUnit: Temperature.Unit)

Sets the active temperature display unit.

Link copied to clipboard
abstract suspend fun setClockTimeFormat(timeFormat: TimeFormat)

Sets Settings.System.TIME_12_24 to the time format setting determined by the timeFormat parameter. This API requires the Manifest.permission.WRITE_SETTINGS permission.

Link copied to clipboard
abstract suspend fun setSystemLocale(locale: Locale)

Sets locale as the Android System Locale. This can be used to switch language on the Android system level. This API requires the Manifest.permission.CHANGE_CONFIGURATION permission.