isForegroundServiceRunning method

  1. @override
Future<bool> isForegroundServiceRunning()
override

Returns true if the Android foreground service is currently running. Use this on app startup to restore UI state after the app was killed.

Implementation

@override
Future<bool> isForegroundServiceRunning() async {
  return await _channel.invokeMethod<bool>('isForegroundServiceRunning') ?? false;
}