我正在使用Custom Tabs启动web view.
问题是,如果我禁用chrome它,它会打开URL一个活动,其中没有任何按钮。
Web Browser如果您的用户设备上未安装 chrome,我想启动,如果存在 chrome,我想启动custom tab。
这是我要启动的代码Custom Tabs
CustomTabsIntent customTabsIntent = new CustomTabsIntent.Builder()
.addDefaultShareMenuItem()
.setShowTitle(true)
.build();
// This is optional but recommended
CustomTabsHelper.addKeepAliveExtra(eContext, customTabsIntent.intent);
// This is where the magic happens...
CustomTabsHelper.openCustomTab(eContext, customTabsIntent,
Uri.parse(url),
new WebViewFallback());