title: Force deeplinks to open externally (chrome custom tabs)
body: <p>I want to force the usage of custom tabs in my app. Currently it <em>loops</em> as soon as I try to open the deeplinked URL with my app via the custom tabs.</p>
  
  <pre><code>&lt;activity
      android:name="com.example.android.UrlActivity"
      android:launchMode="singleTop"&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;
              android:host="app.example.com"
              android:scheme="http" /&gt;
          &lt;data
              android:host="app.example.com"
              android:scheme="https" /&gt;
  
      &lt;/intent-filter&gt;
  &lt;/activity&gt;
  </code></pre>
  
  <p>This code tries to open the custom tabs but I don't want the deeplink to handle the url again and loop with my app...</p>
  
  <pre><code>CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder();
  [...]
  CustomTabsIntent customTabsIntent = builder.build();
  
  // Get all apps that can handle VIEW intents.
  List&lt;ResolveInfo&gt; resolvedActivityList = context.getPackageManager().queryIntentActivities(customTabsIntent.intent, 0);
  ArrayList&lt;ResolveInfo&gt; packagesSupportingCustomTabs = new ArrayList&lt;&gt;();
  for (ResolveInfo info : resolvedActivityList) {
      Intent serviceIntent = new Intent();
      serviceIntent.setAction(CustomTabsService.ACTION_CUSTOM_TABS_CONNECTION);
      serviceIntent.setPackage(info.activityInfo.packageName);
      // Check if this package also resolves the Custom Tabs service.
      if (context.getPackageManager().resolveService(serviceIntent, 0) != null) {
          // don't use this app
          if (!info.activityInfo.packageName.equals(context.getPackageName()))
              packagesSupportingCustomTabs.add(info);
      }
  }
  customTabsIntent.intent.putExtra(Intent.EXTRA_INITIAL_INTENTS, packagesSupportingCustomTabs.toArray(new Parcelable[]{}));
  
  customTabsIntent.launchUrl(context, Uri.parse(url));
  </code></pre>