start static method

Future start(
  1. AccessibilityServiceCallback serviceEntrypoint
)

Implementation

static Future<dynamic> start(
    AccessibilityServiceCallback serviceEntrypoint) async {
  CallbackHandle? handle =
      PluginUtilities.getCallbackHandle(serviceEntrypoint);
  if (handle == null) {
    log("background entrypoint cannot be null");
    return false;
  }
  log("starting accessibility  service");
  await _foregroundChannel
      .invokeMethod("start", {"callbackHandle": handle.toRawHandle()});
  log("checking if accessibility service is running");
  final running = await _foregroundChannel.invokeMethod("isRunning");
  if (running != _running) {
    _running = running;
  }

  return running;
}