Skip to content

Instantly share code, notes, and snippets.

@kyuucr
Created May 11, 2012 09:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kyuucr/2658573 to your computer and use it in GitHub Desktop.
Save kyuucr/2658573 to your computer and use it in GitHub Desktop.
Android - Finish activity with result
Intent data = new Intent();
[...]
if (getParent() == null) {
setResult(Activity.RESULT_OK, data);
} else {
getParent().setResult(Activity.RESULT_OK, data);
}
finish();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment