title: How to remove browser from background after twitter authentication?
body: <p>In my android application we are using Scribe API for Twitter login. For calling twitter authentication url in browser using below code </p>
  
  <pre><code>OAuthService service  = new ServiceBuilder()
      .provider(TwitterApi.SSL.class)
      .apiKey(myApiKey)
      .apiSecret(myApiSecret)
      .callback(twitterCallback)
      .build();
  Token  token = service.getRequestToken();
  String authUrl = service.getAuthorizationUrl(token);
  
  Intent intent = new Intent(Intent.ACTION_VIEW);
  intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
  intent.setData(Uri.parse(authUrl));
  context.startActivity(intent);
  </code></pre>
  
  <p>After twitter authentication has completed coming back to activity now we are moving to another activity in the application  i.e MainActivity. </p>
  
  <pre><code>@Override
  protected void onResume() {
  super.onResume();
  if(uri != null &amp;&amp; uri.toString().startsWith(“oauth://twitter”){
              Intent intent = new Intent(this, MainActivity.class);
              startActivity(intent);
          } 
  }
  </code></pre>
  
  <p>Manifest code is given below</p>
  
  <pre><code>&lt;activity
          android:name=".LauncherActivity"
          android:label="@string/app_name"
          android:screenOrientation="portrait" &gt;
          &lt;intent-filter&gt;
              &lt;action android:name="android.intent.action.MAIN" /&gt;
  
              &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
          &lt;/intent-filter&gt;
          &lt;intent-filter&gt;
              &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="twitter"
                  android:scheme="oauth" /&gt;
          &lt;/intent-filter&gt;
      &lt;/activity&gt;
  </code></pre>
  
  <p>In Main activity we have logout button, When i press logout here calling below method,</p>
  
  <pre><code>private void logout(){
          Intent intent = new Intent(Intent.ACTION_MAIN);
          intent.addCategory(Intent.CATEGORY_HOME);
          intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
          startActivity(intent);
          this.finish();
  }
  </code></pre>
  
  <p>So far working fine,Now going to device Homescreen. Here the problem is when i long press on home button showing two apps one is my native application and another one is myapp in browser. How to handle remove browser after authentication has completed?</p>
  
  <p>Thanks in advance</p>