isServiceRunning static method

Future<bool> isServiceRunning()

Checks if the background location tracking service is currently running.

Returns true if the location service is active and running in the background. This is useful to determine the current state of the service.

Returns: A Future that resolves to true if the service is running, false otherwise.

Implementation

static Future<bool> isServiceRunning() async {
  return (await _channel
      .invokeMethod<bool>(Keys.METHOD_PLUGIN_IS_SERVICE_RUNNING))!;
}