Override Power button just like Home button
Well, I am doing something in which I want to disable all hard buttons of the device. Hard buttons like Power, Home, Volume up, Volume down, Search, Back. I have successfully overridden almost all buttons here except Power. So I just want you people to see and please share some ideas so that I get can away with it. I am getting the long press Power keyevent in onDispatchKeyEvent() , in the same way I want to catch the short click of the same. Moreover when pressing power I also tried to stop Screen off by getting the Broadcast of SCREEN_OFF and I succeeded in receiving it but I was not able to