【发布时间】:2018-05-25 01:19:45
【问题描述】:
我已经关注了documentation for In-App-Indexing
- 将
assetlinks.json上传到https://mycompany.com/.well-known/assetlinks.json 将
com.google.firebase:firebase-appindexing:11.6.0添加为依赖项并-
添加到我的应用程序的清单中:
<activity android:name=".main.view.MainScreenActivity" android:label="@string/app_name" android:launchMode="singleTask" android:theme="@style/AppTheme.NoActionBar"> <!--deeplinking--> <intent-filter android:autoVerify="true" android:label="@string/app_name"> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:host="www.mycompany.com" android:path="/" /> <data android:scheme="http" /> <data android:scheme="https" /> <data android:pathPattern="/somepath/" /> </intent-filter> </activity>
我已经根据the documentation 测试了所有这些,一切似乎都很好。
在 Android 5 及更高版本上,我可以从 Play 商店下载我的应用,搜索我网站的内容,Google 将直接从我的应用显示结果。我也可以直接从 Google 的搜索结果跳转到我的应用程序中。所以一切都好。
这在 Android 4 上不起作用。
我注意到,在 Android 5 上安装和打开我的应用程序时,日志中会显示以下内容:
I/IntentFilterIntentSvc:正在验证 意图过滤器。 verifyId:4 方案:“https” 主机:“www.mycompany.com” 包:“com.mycompany.myapp”。 12-11 14:26:49.641 1708-9067/?
I/IntentFilterIntentSvc:验证 4 完成。成功:真。失败的 主持人:。
这不会发生在 Android 4 设备上。
知道这里可能存在什么问题吗?我没有发现任何信息表明 Android 4 不支持 In-App-Indexing。
【问题讨论】:
标签: android firebase deep-linking firebase-app-indexing