My application sends an sql insert query everytime the telephone is tilted at more than 45°
I need either to stop the user from quitting the application or have it still running in the background so that it still sends the queries
basically I need the application to be running all the time, any ideas?
thanks
You should create a Service. This will run in the background executing the SQL inserts while leaving the user free to interact with their phone and answer calls. Remember to keep in mind battery usage and CPU resources while it is running.
Another common technique is to add a status bar notification while the service is running. This informs the user that the app is still running in the background, and allows them to bring a relevant activity back to the foreground by selecting it.