This has been driving me nuts for a while now.
Is there any way of reliably detecting if the home button has been pressed in an android application?
Failing
Try to create a counter for each screen. If the user touch HOME, then the counter will be zero.
public void onStart() { super.onStart(); counter++; } public void onStop() { super.onStop(); counter--; if (counter == 0) { // Do.. } }