I am designing an Home Screen in which I am showing the applist in a gridview. There are some animation in the 1st screen of my HOMESCREEN and when you press on a button then a grid is shown. So, the problem is that; 1)).I opened an application from the gridview,it opens normally but when i exit from that particular application,the BACKButton takes me to the screen of GridView.(It is OKAY). Now,When I press the HOME Button,It is doing the same work as it does on BACKBUTTON.
I am listening to these butons using dispatchKeyEvent(KeyEvent event)
but it is not working with home button..
Logically ,I should not work because this dispatchKeyEvent(KeyEvent event)
works for my application not for any other application..
I found some other paths to resolve this problem,
When i open other apps,onPause() and onStop() functions are called in my homescreen,suppose I set a flag over there but by doing this How will I be able to know that after doing his stuff in OTher application user presses HOME BUTTON or BACK BUTTON.
You should declare your home activity look like below code
and declare gridactivity as a normal activity in Manifest
I hope you got solution.