例如,如果我有一个网站名为:
http://www.testmycars.com当有人在他的android设备搜索应用程序中搜索雪佛兰时,我希望这个html文件被编入索引,并显示我的应用程序内容的链接:
http://www.testmycars.com/cars/huge/chevrolet.html因此,我将这段代码添加到html文件头部:
<link rel="alternate" href="android-app://com.mycompany.myapp/http/section/chevrolet"/>我将这个意图过滤器添加到我的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>它是否适用于意图过滤器中主机属性和html头中的URI?我不想指定完整的网站,因为我正在使用一个应用程序生成器,它为这个意图过滤器构建了许多具有相同主机属性的app。google应用程序索引可以与此代码一起工作吗?
谢谢
发布于 2015-11-06 00:49:02
你能告诉我你的目标是什么吗?它是将一个网站关联到多个应用程序,在所有应用程序上提供相同的内容,还是在每个应用程序中提供来自网站的不同内容(不同部分)?
另外,为什么你不想在深度链接中提供网站的完整域名?
干杯。
https://stackoverflow.com/questions/33213700
复制相似问题