diff --git a/lib/entities/background_tasks.dart b/lib/entities/background_tasks.dart index 3d90a6318..c16207a60 100644 --- a/lib/entities/background_tasks.dart +++ b/lib/entities/background_tasks.dart @@ -394,6 +394,14 @@ Future initializeService(FlutterBackgroundService bgService) async { ), ); + try { + bool isServiceRunning = await bgService.isRunning(); + if (isServiceRunning) { + print("Service is ALREADY running!"); + return; + } + } catch (_) {} + await bgService.configure( androidConfiguration: AndroidConfiguration( onStart: onStart,