title: How to give cancel input to onActivityResult(int requestCode, int resultCode, Intent data)
body: <p>I call activity with </p>
  
  <pre><code>Intent intent = new Intent(this, DetailsActivity.class);
  startActivityForResult(intent, 1);
  </code></pre>
  
  <p>I have to buttons "Add" and "Cancel". After user enters data and click "Add" it works fine. But I'm not sure what to add into onClickCancel because if I just put finish() I get nullPointerException cause it's expecting onActivityResult(int requestCode, int resultCode, Intent data) </p>