I am preparing app that will continuously run in the background and send data at a specific time interval to MySQL
database. App user should be able to set the time interval from the app.
Option#1 - With Media Projection and using Services class - App runs in the background even if the app is removed/killed from task manager. But the user is not able to set time interval of choice to send data to MySQL
database.
Option#2 - Using only Media Projection - App runs in the background but if the app is removed/killed from task manager then App will stop working in the background. Here App user is able to set time interval of choice to send data to MySQL
database.
So, how can I make so that the App runs in the background and can not be killed/removed from task manager and still App user should be able to set time interval of choice to send data to MySQL
database at specified time interval.
Thank You.