Solution 1 :
flutter_background_services plugin. You can start a foreground service which will keep running even if the app is terminated.
Here, you can set the interval as low as 1 second.
It is using STICKY service, which basically means, it will restart the service if terminated by the OS.
I want to implement the feature (Example images were attached below) in the flutter application. I want that if I started a service, then it will not be killable till the service end. It will show a notification like this that the application service is still active.
I want a service like this, the application continuously uploads the location of the user to my server in the background continuously.
I tried the plugin work_manager. But this plugin runs the service every 15 minutes (15 minutes is the minimum time we can set).
Example of my requirements:
1. Here in my android task there is no application running.
2. But still, this application is running because the service was enabled.
Comment posted by Swayamshree Mohanty
another query is that, can we run multiple services?