I want to do something simple on android app. How is it possible to go back to a previous activity.
What code do I need to go back to previous activity
You can try this:
@Override public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK && event.getRepeatCount() == 0) { finish(); return true; } return super.onKeyDown(keyCode, event); }