Cancel the "Back" button, and then start operation "A" from it. for instance
@Override public boolean onKeyDown(int keyCode, KeyEvent event) { if ((keyCode == KeyEvent.KEYCODE_BACK)) {
On the other hand, if your application is only for new devices (API level 5, I think), you can do it instead
@Override public void onBackPressed() {
source share