I have made my application HOME application, so that when you press HOME button, you are redirected to my application. From my application you can open other applications like browser and then return to my application either by pressing BACK or HOME keys. The problem now is that I need to know when user returns using HOME and when using BACK key. I tried printing Intent information, but it appears to be the same in both scenarios.
EDIT I was checking intent in onResume using getIntent(). After overriding onNewIntent method I now get a different intent there when user returns using HOME button, but this method is not called when BACK is pressed. Is it safe to assume, that if onNewIntent with android.intent.category.HOME is called, then user returned using HOME button and otherwise returned using BACK button?