locationMode property

String? locationMode
getter/setter pair

The degree of location detection enabled. Possible string values are:

  • "LOCATION_MODE_UNSPECIFIED" : Defaults to LOCATION_USER_CHOICE.
  • "HIGH_ACCURACY" : On Android 8 and below, all location detection methods are enabled, including GPS, networks, and other sensors. On Android 9 and above, this is equivalent to LOCATION_ENFORCED.
  • "SENSORS_ONLY" : On Android 8 and below, only GPS and other sensors are enabled. On Android 9 and above, this is equivalent to LOCATION_ENFORCED.
  • "BATTERY_SAVING" : On Android 8 and below, only the network location provider is enabled. On Android 9 and above, this is equivalent to LOCATION_ENFORCED.
  • "OFF" : On Android 8 and below, location setting and accuracy are disabled. On Android 9 and above, this is equivalent to LOCATION_DISABLED.
  • "LOCATION_USER_CHOICE" : Location setting is not restricted on the device. No specific behavior is set or enforced.
  • "LOCATION_ENFORCED" : Enable location setting on the device.
  • "LOCATION_DISABLED" : Disable location setting on the device.

Implementation

core.String? locationMode;