@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if ((keyCode == KeyEvent.KEYCODE_BACK)) {
onBackPressed();
}
}
@Override
public void onBackPressed() {
//this is only needed if you have specific things
//that you want to do when the user presses the back button.
/* your specific things...*/
super.onBackPressed();
}