On Nov 23, 9:00 am, Naveen <kumarnaveen.si...@gmail.com> wrote: > How to handle Home and Back key of a device. > > down vote favorite > 3 > share [fb] share [tw] > > So I have this method in one of my Android Activities: > > @Override > public boolean onKeyDown(int keyCode, KeyEvent event) > { > if(keyCode == KeyEvent.KEYCODE_BACK) > { > Log.d("Test", "Back button pressed!"); > } > else if(keyCode == KeyEvent.KEYCODE_HOME) > { > Log.d("Test", "Home button pressed!"); > } > return super.onKeyDown(keyCode, event); > > } > > Here this code only works with back button but not with home key.. > > Please help me , i want seperate functionality on Home key separate > functionality on back key.
you cannot handle home key in your app, fortunatelly pskink -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en