This commit is contained in:
Matthew Fosse 2024-08-29 17:58:07 -04:00
parent 9b96bde7f2
commit 00c1f450c5

View file

@ -394,6 +394,14 @@ Future<void> 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,