I have a question about the exit button. I have read several posts on here about use of an exit button/back button. Also the blog: http://blog.radioactiveyak.com/2010/05/when-to-include-exit-button-in-android.html, which clears discourages the use of an exit button.
Here is my question. I have an app that is very small; however it pulls data from the webservice/MySql database online. It is supposed to only pull data on first open. Or, if the user selects update data from a menu. I do not have an exit button in the app, However I thought that if the user would back completely out of the app, this would be the same as an EXIT.
After backing out of the app, I can still see the app in Setting>Applications>Running Services. It says “1 process and 1 service”. In Manage Applicaions, it says that the app has been running for 36 hours.
Is this okay? I do not want users to think my app is using their battery.
On a separate note, I do not see an additional updating (pull from webservice) after backing out. But if I install the app on my galaxy Tablet 10.1 running Android 3.1, I do see an occasional update from the webservice.
Anyone have some advice for me?
Android won’t stop an application when the user presses “back”. The application will stay on memory until Android needs the memory for another application. Any thread that was running when the user presses “back” will continue to run. Traditionally, you’re supposed to stop all those processes on the
onPause()method of yourActivity(additionally, store all preferences and other cleanup.)Also, if you’ve started a
Service(as stated), then it will continue to run until you tell it to stop. On rare occasions, Android will kill aServiceto free up resources, but for the most part you have to kill it.