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
Recently I was trying to detect the home press button, because I needed it to do the same as the method "onBackPressed()". In order to do this, I had to override the method "onSupportNavigateUp()" like this:
override fun onSupportNavigateUp(): Boolean {
onBackPressed()
return true
}
It worked perfectly. =)