title: Xamarin.Auth Google Presenter not closing in Android Xamarin.Forms App
body: <p>I am using Xamarin.Form to write a Android app.  I have successfully implemented the OAuth and I can sign in and get the user information using OAuth2Authenticator.</p>
  
  <p>When the user clicks signup/Login I show the OAuthLoginPresenter as follows:</p>
  
  <pre><code>var oAuthLoginPresenter = new Xamarin.Auth.Presenters.OAuthLoginPresenter();
  oAuthLoginPresenter.Login(App.OAuth2Authenticator);
  </code></pre>
  
  <p>This works great and the user sees the login page.</p>
  
  <p>When the user clicks Allow the completed Event on the OAuth2Authenticator instance fires as expected and the user is once again back looking at the app.</p>
  
  <p>However this is where my problem is - I get a notification:</p>
  
  <blockquote>
    <p>If CustomTabs Login Screen does not close automatically close
    CustomTabs by Navigating back to the app.</p>
  </blockquote>
  
  <p>Thing is though I am back at the app.  If I look at all my open apps I can see the login screen is still running in the back ground so that presenter has not closed. </p>
  
  <p>In my intercept Activity which gets the redirect looks like this:</p>
  
  <pre><code>[Activity(Label = "GoogleAuthInterceptor")]
  [IntentFilter
  (
      actions: new[] { Intent.ActionView },
      Categories = new[]
      {
              Intent.CategoryDefault,
              Intent.CategoryBrowsable
      },
      DataSchemes = new[]
      {
          // First part of the redirect url (Package name)
          "com.myapp.platform"
      },
      DataPaths = new[]
      {
          // Second part of the redirect url (Path)
          "/oauth2redirect"
      }
  )]
  
  public class GoogleAuthInterceptor: Activity
  {
      protected override void OnCreate(Bundle savedInstanceState)
      {
          base.OnCreate(savedInstanceState);
  
          // Create your application here
          Android.Net.Uri uri_android = Intent.Data;
  
          // Convert Android Url to C#/netxf/BCL System.Uri
          Uri uri_netfx = new Uri(uri_android.ToString());
  
          // Send the URI to the Authenticator for continuation
          App.OAuth2Authenticator?.OnPageLoading(uri_netfx);
  
          Finish();
      }
  }
  </code></pre>
  
  <p>Am I missing a step in here to close that presenter?  Any other ideas please?</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>I have now found that using Chrome as the default browser works fine and presenter is closed. But if I use a Samsung browser as my default browser - it does not close.</p>
  
  <p>So I need a way to close it manually. </p>