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
This works for me. You can override onUserLeaveHint method https://www.tutorialspoint.com/detect-home-button-press-in-android
@Override protected void onUserLeaveHint() { // super.onUserLeaveHint(); }