title: How to close browser activity when returning to calling activity?
body: <p>I have this situation. I have an Activity A that sends an intent to create an Activity B which is a browser to authenticate a user with his twitter account. When credentials are submitted the control goes back again to Activity A and I can keep navigating through the app. However, if the users leaves the app, the browser activity is being resumed, forcing the user to close the browser. </p>
  
  <p>The problem is that I would like to remove the browser activity from the stack once I get the authentication credentials.</p>
  
  <p>Do you know if this is possible? I cannot use startActivityForResult since the authentication needs to be made in the browser, I don't have any control over that activity. Thanks a lot</p>
  
  <p>EDIT:</p>
  
  <p>I'm starting the activity like this:</p>
  
  <pre><code>startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(authUrl)).setFlags(Intent.FILL_IN_ACTION));
  </code></pre>