简体   繁体   English

Google App索引:是否需要在主机意图过滤器属性中指定完整的网站?

[英]Google App Indexing: It is required to specify the full website in host intent filter atribute?

For example, if i have a website called: 例如,如果我有一个名为:

http://www.testmycars.com

And i want that this html file gets indexed and display a link to my app content when someone searches for chevrolet in his android device search app: 而且我希望有人在他的android设备搜索应用程序中搜索Chevrolet时,将此html文件编入索引并显示指向我的应用程序内容的链接:

http://www.testmycars.com/cars/huge/chevrolet.html

so i add this to head of that html file: 所以我将其添加到该html文件的头部:

<link rel="alternate" href="android-app://com.mycompany.myapp/http/section/chevrolet"/>

and i add this intent filter to my android manifest: 我将此意图过滤器添加到我的android清单中:

        <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="section" />
        </intent-filter>

Will it work with that host atribute in the intent filter and that URI in the head of my html? 它可以与intent过滤器中的主机属性以及html头部中的URI一起使用吗? i dont want to specify the full website because i'm using an app generator that builds a lot of apks with the same host atribute for this intent-filter. 我不想指定完整的网站,因为我使用的是一个应用生成器,该应用生成器为此意图过滤器构建了许多具有相同主机属性的apk。 Will google app indexing works with this code? 谷歌应用程序索引可以使用此代码吗?

Thanks 谢谢

Can you tell me what is your objective. 你能告诉我你的目标是什么。 Is it to relate one web site to multiple Apps, providing the same content on all the Apps, or is it to provide a different content (different sections) from the website in each of the Apps? 是将一个网站与多个应用程序相关联,在所有应用程序上提供相同的内容,还是在每个应用程序中提供与网站不同的内容(不同部分)?

Also, why don't you want to provide the full domain of the website in the deep link? 另外,为什么不希望在深层链接中提供网站的完整域名?

Cheers. 干杯。

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

相关问题 Google应用索引,如何检查其是否在网站上有效 - Google app indexing, how to check if it works on the website 意图过滤器不适用于主机 - Intent filter not work with host 应用索引-应用未与Google搜索中的网站链接一起显示 - App Indexing- app not showing with website link in google search 我们需要HTTPS网站来实现Google应用索引吗? - Do we need HTTPS website to implement google app indexing? Android:意图过滤器路径模式和主机 - Android: Intent Filter pathpattern and host .NET MAUI Firebase 消息:针对 Android 12 及更高版本的应用程序需要在意图过滤时为 `android:exported` 指定显式值 - .NET MAUI Firebase Messaging: Apps targeting Android 12 and higher are required to specify an explicit value for `android:exported` when intent filter Google Play上的免费试用版应用程序,我自己网站上的完整版本 - Free, trial app on Google Play, full version on my own website Google App索引:如何映射我的网站链接和应用程序深层链接 - Google App Indexing: how to map my website links and app deep links 带方案和主机的Intent过滤器不起作用 - Intent filter with scheme and host does not work intent-filter中的空主机的说明符是什么? - What is the specifier for empty host in intent-filter?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM