I am trying to implement custom chrome tabs. I am using Google\'s default library customtabs.
I referred this tutorial for implementing custom chrom
you can avoid this problem by specifying the package name like this intentCustomTabs.intent.setPackage("com.android.chrome");
full code :
String url = link;
CustomTabsIntent.Builder builderCustomTabs = new CustomTabsIntent.Builder();
CustomTabsIntent intentCustomTabs = builderCustomTabs.build();
intentCustomTabs.intent.setPackage("com.android.chrome");
intentCustomTabs.intent.addFlags(new Integer("67108864"));
builderCustomTabs.setShowTitle(true);
builderCustomTabs.setToolbarColor(ContextCompat.getColor(this, R.color.colorPrimary));
builderCustomTabs.enableUrlBarHiding();
intentCustomTabs.launchUrl(this, Uri.parse(url));