start static method
Enable location tracking.
This is the plugin's power ON button. The plugin will initially start into its stationary state, fetching an initial location before turning off location services. Android will be monitoring its Activity Recognition System while iOS will create a stationary geofence around the current location. NOTE If you've configured a Config.schedule, this method will override that schedule and engage tracking immediately.
Example
BackgroundGeolocation.start().then((State state) {
print('[start] success - ${state}');
});
For more information, see Philosophy of Operation
Implementation
static Future<State> start() async {
Map state = (await _methodChannel.invokeMapMethod('start'))!;
return State(state);
}