@Override

public boolean onKeyDown(int keyCode, KeyEvent event) {

 // TODO Auto-generated method stub


if(KeyEvent.ACTION_DOWN==KeyEvent.KEYCODE_BACK)

 {

startActivity(intent.setClass(getApplicationContext(), Anotheractivty.class
));

   }

return false;

}

Try this....

Yogi


On Fri, Jun 15, 2012 at 12:21 PM, Vijay Krishnan
<vijay.vijay...@gmail.com>wrote:

> Hi all,
>          How to call another activity when i press the back button.
>
> Thanks,
> vijay.k
>
> --
> 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

-- 
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

Reply via email to