gpt4 book ai didi

android - 当您点击 chrome 上的链接时,有没有办法禁用 "Open in [App Name]"建议?

转载 作者:行者123 更新时间:2023-12-02 05:48:07 27 4
gpt4 key购买 nike

与我们的域相关的每个链接都会打开一个弹出窗口,建议打开该应用程序。我们最近试图摆脱它,但我们无法做到。我在这方面不是很有经验。

原谅我的无知。我认为这与我们在应用程序开发中所做的事情有关。

Open with: [App Name] or Chrome ---- Just this once or Always

有时即使我们为 Chrome 选择“始终”选项,它也会重复相同的问题。它变得非常非常快 :)

是否有人知道可能出现的问题或如何禁用该功能或​​如何定位我们网站上的特定页面?

提前致谢

编辑:似乎定义该功能的正确方法是“消歧义对话框”。

编辑 2:我的目标是禁用消歧对话框。我不希望我的用户被定向到该应用程序。或者甚至询问他们是否要在应用程序中打开它。我希望这些链接直接将用户转到该网页,而不是询问他/她是否想在应用程序中打开它。

最佳答案

只有 Android 6.0 API for App Linking 才能通过消除歧义对话框

根据 Handling App Links training :

Android 6.0 (API level 23) and higher allow an app to designate itself as the default handler of a given type of link. If the user doesn't want the app to be the default handler, they can override this behavior from Settings.

Automatic handling of links requires the cooperation of app developers and website owners. A developer must configure their app to declare associations with one or more websites, and to request that the system verify those associations. A website owner must, in turn, provide that verification by publishing a Digital Asset Links file.

这涉及创建适当的 Intent 处理程序并通过添加 android:autoVerify="true" 启用自动验证:

 <activity ...>

<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http" android:host="www.android.com" />
<data android:scheme="https" android:host="www.android.com" />
</intent-filter>

</activity>

然后,必须通过 declaring a website association 在网站端进行更新,这确保网站所有者和应用程序开发人员都协调以允许应用程序自动成为 URL 架构的默认设置。

进一步研究这个Handling Android App Links

如果您希望大多数 URL 直接打开到您 Android 应用中的特定内容,请研究这个。 Android 应用链接可以为您的应用带来更多流量,帮助您发现最常用的应用内容,并让用户更轻松地在已安装的应用中共享和查找内容。遵循并实现建议的链接,以最大限度地减少点击 URL 时打开对话的行为

关于android - 当您点击 chrome 上的链接时,有没有办法禁用 "Open in [App Name]"建议?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58750968/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com