How to disable all hardware keys programatically in android?
- by Raghu Rami Reddy
I am developing android application with lock functionality. please suggest me how to disable all the hard keys programatically. here i am using beleow code to disable back button. i want like this functionality for all hard keys like home,search,camera, shortcut keys
here is my code:
@Override
public boolean onKey(View v, int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_SEARCH) {
Log.d("KeyPress", "search");
return true;
}
return false;
}
Thanks in advance.