hi want to specify in code to move to specific activity after pressing back button on android key pad how i can accomplish this, frnds help me
now i got the solution with the help of our friends
hi got the solutin to my prob onBackPressed() works after 1.6 version for previous versions we need use public boolean onKeyDown(int keyCode, KeyEvent event) method
my code for this solved prob is
@Override public boolean onKeyDown(int keyCode, KeyEvent event) { if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.CUR_DEVELOPMENT && keyCode == KeyEvent.KEYCODE_BACK && event.getRepeatCount() == 0) { // Take care of calling this method on earlier versions of // the platform where it doesn't exist. onBackPressed(); }
return super.onKeyDown(keyCode, event);
}
//@Override
public void onBackPressed() {
// This will be called either automatically for you on 2.0
// or later, or by the code above on earlier versions of the
// platform.
Intent i=new Intent(AgesWebViewIndex.this,TabCls.class);
i.putExtra("age", "agepage");
startActivity(i);
return;
}