I'm looking for a way to detect that my android app has been backgrounded, so that regardless of which Activity
was running upon pressing the Home key (or return key on the last activity in stack) then a specified function will be called.
onPause()
and onStop()
cannot distinguish between a new activity replacing the current one and the app being backgrounded, so I'm looking for advice as to what additional test(s) I must include to ascertain this.