AndroidSettings class

Android-specific settings for background location tracking.

AndroidSettings extends LocatorSettings and provides Android-specific configuration options for location tracking, including notification settings, wake lock duration, update interval, and location provider selection.

Example:

final androidSettings = AndroidSettings(
  accuracy: LocationAccuracy.NAVIGATION,
  interval: 5,
  distanceFilter: 10,
  wakeLockTime: 60,
  client: LocationClient.google,
  androidNotificationSettings: AndroidNotificationSettings(
    notificationTitle: 'Tracking Active',
  ),
);
Inheritance

Constructors

AndroidSettings({LocationAccuracy accuracy = LocationAccuracy.NAVIGATION, int interval = 5, double distanceFilter = 0, AndroidNotificationSettings androidNotificationSettings = const AndroidNotificationSettings(), int wakeLockTime = 60, LocationClient client = LocationClient.google})
Creates an AndroidSettings instance.
const

Properties

accuracy LocationAccuracy
The accuracy level for location updates. Default: LocationAccuracy.NAVIGATION
finalinherited
androidNotificationSettings AndroidNotificationSettings
Notification settings for the background service.
final
client LocationClient
The location provider to use for obtaining location updates. Default: LocationClient.google
final
distanceFilter double
Minimum distance in meters between location updates. Location updates are only triggered if the device moves at least this distance from the last reported location. Default: 0 meters (all updates are reported)
finalinherited
hashCode int
The hash code for this object.
no setterinherited
interval int
Interval in seconds between location updates. Default: 5 seconds
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
wakeLockTime int
Duration in minutes that the service will stay alive in the background. Default: 60 minutes
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() Map<String, dynamic>
Converts this AndroidSettings to a map for native platform communication.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited