Back button behaviour like "Home" when there is no history



Is it posable to change “Back” button behaviour to behave like pressing on “Home” button in Android?

I know that Android after some time will kill my activity to clear the cache.

But I don’t want to destroy my main controller when user press “Back” and history is empty.

(like Whatsapp does)

Any ideas?

Manipulating history states and back button after a refresh

I am trying to figure this out as well and having a hard time. I will let you know if I find anything.


I’ve added a request for this on Github, if you could voice your thoughts it would probably help garner more attention