In Android programming, is there a difference between the hardware back button and the back button in the navigation bar. In my application, there is a view where if I click
When you press the 'hardware back button' or the 'provided soft back button' it will trigger the onBackPressed() method in the Activity. You can override this behavior as you wish.
The difference from it to the Navigation Bar 'Back Button' is that on this one you have to handle yourself, like you're doing on the onOptionsItemSelected() method on the 'android.R.id.home' case.
The problem you're having is probably because the 'previous' activity is misusing a 'Cursor'. When you press back on the 'ViewContact', it will finish the 'ViewContact' activity and the onResume() of the previous activity will be called again. So when this happens, apparently your previous activity is trying to reused a closed cursor, then the error happens. On your NavUtils.navigateUpFromSameTask(this) you are probably preventing this from happening. BUT the OFFICIAL and DEFAULT behavior is the one that i described.
One more important difference. If you go back using navigation bar back button in activity which is a parent to your activity will calls onNewIntent method. Unlike hardware back button.