title: Android app continues to run in external browser after redirect
body: <p>As outlined in the title, when one of my app's activities are called with a custom scheme from an external browser (tested with Firefox), it correctly returns to the activity and proceeds like normal. However, the issue is that if I were to open up Task View, I would see that the activity was continuing within the browser task, and my app's task is left at a previous activity.</p>
  
  <p>I start the browser with:</p>
  
  <pre><code>val i = Intent(Intent.ACTION_VIEW)
  i.data = Uri.parse(authUrl)
  startActivity(i)
  </code></pre>
  
  <p>which, eventually, leads to a redirect to my app with a custom scheme:</p>
  
  <pre><code>&lt;action android:name="android.intent.action.VIEW" /&gt;
  &lt;category android:name="android.intent.category.DEFAULT"/&gt;
  &lt;category android:name="android.intent.category.BROWSABLE" /&gt;
  &lt;data android:host="callback"
        android:scheme="d2app"
        android:pathPattern=".*"/&gt;
  </code></pre>
  
  <p>But as you could see <a href="https://cdn.discordapp.com/attachments/295883437938573313/632207667099598848/Screenshot_20191012-002715.jpg" rel="nofollow noreferrer">here</a>
  the browser remains the active task and the app proceeds within it.</p>
  
  <p>Is there a certain flag/set of flags I should be adding to the browser intent? Am I missing something important with the intent filters for the activity? Thanks for any help/pointers you can give.</p>
  
  <p>I apologise if I'm mixing up basic terminology here, I'm very new to app development as a whole.</p>