You do not need to override onBackPressed() - it is already defined as the action that your activity will do by default when the user clicks the back button. So just call onBackPressed() whenever you want to press the back button programmatically.
This will only result in a finish() call, though;)
I think you're confused by what the back button does. By default, this is just a finish() call, so it just exits the current activity. If you have something behind this event, this screen will be displayed.
What you can do is start your activity from the input, add the CLEAR_TOP flag so that the input activity is not there when you exit it.
josephus May 23 '12 at 11:27 2012-05-23 11:27
source share