setBackgroundKeepAlive method

  1. @override
Future<void> setBackgroundKeepAlive(
  1. bool enabled
)
override

Opts the session into an Android background keep-alive (wake + Wi-Fi locks) for off-device playback such as casting. Android only; defaults to a no-op so other platforms (and any that do not override it) are safe.

Implementation

@override
Future<void> setBackgroundKeepAlive(bool enabled) async {
  await methodChannel.invokeMethod('setBackgroundKeepAlive', enabled);
}