Hi Shang, You can use END_BUTTON_BEHAVIOR setting in Settings.System.
Android Developers http://developer.android.com/reference/android/provider/Settings.System.html#END_BUTTON_BEHAVIOR What happens when the user presses the end call button if they're not on a call. Values: 0 - The end button does nothing. 1 - The end button goes to the home screen. 2 - The end button puts the device to sleep and locks the keyguard. 3 - The end button goes to the home screen. If the user is already on the home screen, it puts the device to sleep. Cheers, Keiji Dianne Hackborn wrote: > You already said it, PhoneWindowManager is what handles the keys. > > On Sun, Aug 23, 2009 at 9:53 PM, Shang Hao <[email protected] > <mailto:[email protected]>> wrote: > > > Hi Roman, > > Accepted that I cannot play around with these keys from apps...But > there must be a way somewhere where they must be getting handled....i > just need to broadcast and make these keys handling ineffective/ > effective.... Can u help me with the files which i should be looking > for???? > > Thanks. > > On Aug 23, 7:42 pm, Romain Guy <[email protected] > <mailto:[email protected]>> wrote: > > You cannot disabled these keys from an application. > > > > > > > > On Sun, Aug 23, 2009 at 6:53 PM, Shang Hao<[email protected] > <mailto:[email protected]>> wrote: > > > > > Hi Mark, > > > > > Thanks for your reply.. I actually meant the home key and the > End call > > > button on the device. For home key i have found a solution at > > > PhoneWindowManager.java @framework.... Any idea about the End call > > > button?? > > > > > Thanks. > > > > > On Aug 22, 4:03 am, Mark Murphy <[email protected] > <mailto:[email protected]>> wrote: > > >> Shang Hao wrote: > > >> > Hi, > > >> > dis > > >> > I m making a test application and want to able all keys > excluding the > > >> > back button...... Using below code i am not able to disable > HOME key > > >> > and right soft key..... Please suggest what to do. > > > > >> > @Override > > >> > public boolean onKeyDown(int keyCode, KeyEvent event) { > > >> > if(keyCode == KeyEvent.KEYCODE_BACK){ > > >> > return super.onKeyDown(keyCode, event); > > >> > } > > >> > else { > > >> > return true; > > >> > } > > > > >> > } > > > > >> You cannot disable the home key, and Android does not have > soft keys. > > > > >> -- > > >> Mark Murphy (a Commons > Guy)http://commonsware.com|http://twitter.com/commonsguy > > > > >> _Beginning Android_ from Apress Now Available! > > > > -- > > Romain Guy > > Android framework engineer > > [email protected] <mailto:[email protected]> > > > > Note: please don't send private questions to me, as I don't have time > > to provide private support. All such questions should be posted on > > public forums, where I and others can see and answer them > > > > > -- > Dianne Hackborn > Android framework engineer > [email protected] <mailto:[email protected]> > > Note: please don't send private questions to me, as I don't have time to > provide private support, and so won't reply to such e-mails. All such > questions should be posted on public forums, where I and others can see > and answer them. > > > > -- Keiji, [email protected] --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

