Hi, >From driver just check whether it is possible to report Power key when the button is long pressed. Android you can hack in the frameworks policy PhoneWindowManager file. Based on your product for long press of HOME invoke the shutdown dialog.
On Wed, Jan 2, 2013 at 12:55 PM, Jan Pohanka <xhpoha...@gmail.com> wrote: > Hi, > because the button is placed on the front panel and there was a demand to > let it work as Home button. But as I said before I need it also for power > on/off the device. > > BR > Jan > > Dne neděle, 23. prosince 2012 4:39:15 UTC+1 Alvin Wong napsal(a): > >> Why don't use on-screen virtual buttons? >> >> Jan Pohanka於 2012年12月21日星期五UTC+8下午7時04分43秒寫道: >>> >>> Hi, >>> I'm working on a new tablet device which has only one mechanical button. >>> From the hardware point of view it "enables" the device. I'd like to know >>> if it is possible to share the function of Home and Power button together. >>> Something like single press works as Home, long press works as power >>> menu, even longer press works as power off. Long press of home usualy opens >>> a list of recently used applications, but this can be omited in my project. >>> Can Android work in that way or there is a need to have dedicated power and >>> home button? (I know that home button, can be just virtual on touch panel). >>> >>> I have tried to find the answer in the Android 4.0 Compatibility >>> Definition document, but there is no such information. >>> >>> best regards >>> Jan >>> >> -- > unsubscribe: android-porting+unsubscr...@googlegroups.com > website: http://groups.google.com/group/android-porting > -- With care Ramya -- unsubscribe: android-porting+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-porting