【问题标题】:In-App-Indexing not working on Android 4?应用内索引不适用于 Android 4?
【发布时间】: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


    【解决方案1】:

    使用 App-Indexing api 本身没有最低 API 级别,但不幸的是,对于低于 Jelly Bean 的用户,该 API 依赖于最低 API 17 的 Google 搜索版本。这是对来自的答案的简单转发IanHannibalLake。这是 OG answer 的链接。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-11-04
      • 1970-01-01
      • 1970-01-01
      • 2013-11-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多