attach static method

HardwareLifecycleController attach(
  1. NexoraSdk sdk, {
  2. bool autoStopOnPause = true,
  3. bool stopCamera = true,
  4. bool stopAudio = true,
  5. bool stopBluetoothScan = true,
  6. bool stopLocation = true,
  7. bool stopSensors = true,
  8. bool stopLogging = true,
})

Creates and starts a lifecycle controller.

Implementation

static HardwareLifecycleController attach(
  NexoraSdk sdk, {
  bool autoStopOnPause = true,
  bool stopCamera = true,
  bool stopAudio = true,
  bool stopBluetoothScan = true,
  bool stopLocation = true,
  bool stopSensors = true,
  bool stopLogging = true,
}) {
  final controller = HardwareLifecycleController._(
    sdk: sdk,
    autoStopOnPause: autoStopOnPause,
    stopCamera: stopCamera,
    stopAudio: stopAudio,
    stopBluetoothScan: stopBluetoothScan,
    stopLocation: stopLocation,
    stopSensors: stopSensors,
    stopLogging: stopLogging,
  )..start();
  return controller;
}