startLocationUpdates static method
Start collecting location data and to send it to the server.
iOS: MBAudience uses startMonitoringSignificantLocationChanges
of CoreLocation
with an accuracy of kCLLocationAccuracyHundredMeters
.
To stop collecting location data call stopLocationUpdates
.
Android: MBAudience let you track and target user based on their location,
the framework uses a foreground FusedLocationProviderClient
with priority PRIORITY_BALANCED_POWER_ACCURACY
which is killed the moment the app goes in background.
If you wish to track user position while app is in background you need to implement your own location service,
then when you have a new location you can use this API to send it to the framework: setCurrentLocation(latitude, longitude)
Implementation
static Future<void> startLocationUpdates() {
return MBAudienceFlutterPlugin.startLocationUpdates();
}