I have enabled the app link for my app, in some scenarios I want open URL custom chrome tab for some URLs.
CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder();
CustomTabsIntent customTabsIntent = builder.build();
builder.setShowTitle(true);
Bundle headers = new Bundle();
customTabsIntent.intent.putExtra(Browser.EXTRA_HEADERS, headers);
customTabsIntent.intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
customTabsIntent.launchUrl(context, Uri.parse(url));
As suggested in this flowing code can be used open chrome browser is there any way to do the same with custom chrome tab
String data = "example.com/your_url?param=some_param"
Intent defaultBrowser =
Intent.makeMainSelectorActivity(Intent.ACTION_MAIN,
Intent.CATEGORY_APP_BROWSER);
defaultBrowser.setData(data);
startActivity(defaultBrowser);