Dev-hwang / flutter_foreground_task

This plugin is used to implement a foreground service on the Android platform.
https://pub.dev/packages/flutter_foreground_task
MIT License
152 stars 112 forks source link

Delay in starting the foreground task #292

Open akshaykap11 opened 2 weeks ago

akshaykap11 commented 2 weeks ago

There is delay of 3 seconds before the foreground service actually starts. Is there a way to start the service immediately passing this parameter somewhere -> NotificationCompat.FOREGROUND_SERVICE_IMMEDIATE

Dev-hwang commented 2 weeks ago

https://github.com/Dev-hwang/flutter_foreground_task/blob/f0e65b7d4e3c8a9d43ef542cbb5daab27d3810ed/android/src/main/kotlin/com/pravera/flutter_foreground_task/service/ForegroundService.kt#L330

This plugin is already using this option. Does this issue occur in the basic example?

akshaykap11 commented 2 weeks ago

no, it does not occur in the basic example.

Dev-hwang commented 2 weeks ago

@akshaykap11

Could you provide steps to reproduce the issue or share a sample project?