private static final int REQUEST_CODE = 1; ... startActivityForResult(intent, REQUEST_CODE); ... @Override protected void onActivityResult(int requestCode, int resultCode, Intent resultIntent) { super.onActivityResult(requestCode, resultCode, resultIntent); switch (requestCode) { case REQUEST_CODE: if (resultCode == RESULT_OK) { //do something with resultIntent ... } } }