Chrome Custom Tabs throwing an error when chrome is not installed : No Activity found to handle Intent
<p>Chrome custom tabs working fine when chrome is installed but when chrome is not installed it is throwing an error</p>

<pre><code>CustomTabsIntent.Builder intentBuilder = new CustomTabsIntent.Builder();
intentBuilder.setShowTitle(true);
CustomTabActivityHelper.openCustomTab(activityy, intentBuilder.build(), Uri.parse(link), new WebviewFallback());
</code></pre>

<p>LogCat Error Info</p>

<pre><code>FATAL EXCEPTION: main
Process: opensource.itspr.recycler, PID: 13114
   android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=http://www.google.com/... pkg=com.android.chrome (has extras) }
       at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1889)
       at android.app.Instrumentation.execStartActivity(Instrumentation.java:1579)
       at android.app.Activity.startActivityForResult(Activity.java:3921)
       at android.app.Activity.startActivityForResult(Activity.java:3881)
       at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:784)
       at android.app.Activity.startActivity(Activity.java:4208)
       at android.app.Activity.startActivity(Activity.java:4176)
       at android.support.customtabs.CustomTabsIntent.launchUrl(CustomTabsIntent.java:165)
       at opensource.itspr.recycler.Util.customtabs.CustomTabActivityHelper.openCustomTab(CustomTabActivityHelper.java:41)
       at opensource.itspr.recycler.HolderNews.ItemLink$1.onClick(ItemLink.java:55)
       at android.view.View.performClick(View.java:5201)
       at android.view.View$PerformClick.run(View.java:21163)
       at android.os.Handler.handleCallback(Handler.java:746)
       at android.os.Handler.dispatchMessage(Handler.java:95)
       at android.os.Looper.loop(Looper.java:148)
       at android.app.ActivityThread.main(ActivityThread.java:5443)
       at java.lang.reflect.Method.invoke(Native Method)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)                                                     
</code></pre>

<p>Error Info Image </p>

<p><img src="https://i.stack.imgur.com/L9JqZ.png" alt=""></p>

<p>WebViewFallback.java</p>

<pre><code>public class WebviewFallback implements CustomTabActivityHelper.CustomTabFallback {
@Override
public void openUri(Activity activity, Uri uri) {
    Log.d("I came here", String.valueOf(uri));
    Intent intent = new Intent(activity, WebViewActivity.class);
    intent.putExtra(WebViewActivity.EXTRA_URL, uri.toString());
    activity.startActivity(intent);
}
</code></pre>

<p>}</p>

<p>WebViewActivity.java</p>

<pre><code>public class WebViewActivity extends AppCompatActivity {
public static final String EXTRA_URL = "extra.url";

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_webview);
    String url = getIntent().getStringExtra(EXTRA_URL);
    WebView webView = (WebView)findViewById(R.id.web_view);
    webView.setWebViewClient(new WebViewClient());
    WebSettings webSettings = webView.getSettings();
    webSettings.setJavaScriptEnabled(true);
    setTitle(url);
    getSupportActionBar().setDisplayHomeAsUpEnabled(true);
    webView.loadUrl(url);
}
</code></pre>