startSchedule static method

Future<State> startSchedule()

Initiate the configured AppConfig.schedule.

If an AppConfig.schedule was configured, this method will initiate that schedule. The plugin will automatically be started or stopped according to the configured AppConfig.schedule.

Example

BackgroundGeolocation.startSchedule.then((State state) {
  print('[startSchedule] success: ${state}');
})

Implementation

static Future<State> startSchedule() async {
  Map state = (await _methodChannel.invokeMapMethod('startSchedule'))!;
  return State(state);
}