gpt4 book ai didi

android - App Indexing "Open in App"不起作用

转载 作者:太空宇宙 更新时间:2023-11-03 11:08:38 27 4
gpt4 key购买 nike

因此,我尝试实现应用索引以允许来自谷歌搜索(在 Chrome 应用中)的“在应用中打开”功能。

我已经从谷歌文档中实现了以下部分 https://developers.google.com/app-indexing/ :

  1. 将深层链接添加到您的应用

    <activity
    android:name=".DeepLinkActivity">
    <intent-filter>
    <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="dl.mysite.com"
    android:pathPattern="/" /> <!-- Home page -->
    </intent-filter>
    </activity>
  2. 连接您的应用

    我已通过网站站长和 Play 控制台验证并批准该网站。

  3. 提供深层链接

    <link rel="alternate" href="android-app://com.MyApp.MyApp/http/dl.mysite.com/" />

我已经尝试在 https://developers.google.com/app-indexing/webmasters/test 中测试我的链接“android-app://com.MyApp.MyApp/http/dl.mysite.com/”该链接会打开我的应用程序主页。但是,在谷歌搜索结果(在 Chrome 应用程序中)中与我的网站对应的列表没有“在应用程序中打开”功能。

我想要这个“在 App 中打开”功能。如果有任何帮助,我将不胜感激。

最佳答案

试试这个解决方案

<activity ... android:launchMode="singleTask">
[...]
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="@string/domain"
android:scheme="https"
android:pathPattern=".*" />
<data
android:host="@string/domain"
android:scheme="http"
android:pathPattern=".*" />
</intent-filter>

Different behaviors in Open in App from browsers and other applications to my webView app

关于android - App Indexing "Open in App"不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29813627/

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