简体   繁体   English

没有用户意图的Chrome自定义标签

[英]Chrome Custom Tabs without intent for user

I'm trying to implement Chrome Custom Tabs but in my small example, everytime I launch a URL it asks me with which browser I'd like to open it. 我正在尝试实现Chrome自定义标签,但在我的小示例中,每次启动URL时,它都会询问我要使用哪个浏览器打开它。

I've seen some apps like Twitter official app where the Custom Tab opens without asking anything to the user. 我见过一些应用程序,例如Twitter官方应用程序,其中的“自定义选项卡”打开后没有向用户询问任何内容。 How can I achieve that? 我该如何实现?

Thanks in advance 提前致谢

EDIT: I've followed this tutorial, so my code is 99% the same and the issue is the same in both codes. 编辑:我遵循了教程,所以我的代码是99%相同,并且两个代码中的问题是相同的。

I´ve solved the issue. 我已经解决了这个问题。 I was launching the URL inside a RecyclerView when a CardView was clicked. 单击CardView时,我正在RecyclerView内启动URL。

The problem is I was warming up the tab at the same time I was launching it. 问题是我在启动标签的同时正在预热标签。 After changing that, everything worked fine. 更改后,一切正常。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Chrome自定义标签 - 意图未被触发(Android) - Chrome Custom Tabs - Intent not being triggered (Android) Chrome自定义标签返回错误的Intent - Chrome Custom Tabs returning to wrong Intent Chrome 自定义标签和意图过滤器 - Chrome custom tabs and intent-filter Chrome自定义标签是否要求用户下载Chrome应用? - Does Chrome Custom Tabs require the user to download the Chrome app? 未安装Chrome时,Chrome自定义标签页抛出错误:找不到用于处理Intent的活动 - Chrome Custom Tabs throwing an error when chrome is not installed : No Activity found to handle Intent 无意刷新Android标签 - Refreshing Android Tabs without Intent 有没有办法启动Chrome自定义标签而不实际显示它们? - Is there a way to launch Chrome Custom Tabs without actually displaying them? Chrome自定义标签:图标状态并响应用户操作 - Chrome Custom Tabs: Icon state and responding to user actions 如何通过Chrome自定义标签中的intent / pendingIntent关闭应用/活动或代码菜单项 - How to close app/activity or code menu item via intent/pendingIntent in Chrome Custom Tabs 使用 Chrome 自定义标签“ActivityNotFoundException: No Activity found to handle Intent”打开标签 URI - Opening Tag URI with Chrome Custom Tabs “ActivityNotFoundException: No Activity found to handle Intent”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM