本文介绍了Android-更新SDK版本23后,至少添加一个带有ACTION-VIEW Intent过滤器的Activity的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 AndroidManifest.xml 中获得以下工具提示:

I am getting the following tool tip in AndroidManifest.xml:

添加深层链接,使您的应用进入Google索引,从Google搜索获取安装并向您的应用发送流量.

Adds deep links to get your app into the Google index,to get installs and traffic to your app from Google Search.

任何人都可以解释为什么会这样吗?

Can anyone explain why it is so?

推荐答案

摘自官方文档:

使用此链接为应用内容启用深层链接,您将了解如何使用它.

Using this link Enabling Deep Links for App Content you'll see how to use it.

并使用此测试您的应用索引实现如何进行测试.

And using this Test Your App Indexing Implementation how to test it.

<activity
    android:name="com.example.android.GizmosActivity"
    android:label="@string/title_gizmos" >
    <intent-filter android:label="@string/filter_title_viewgizmos">
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />
        <!-- Accepts URIs that begin with "http://www.example.com/gizmos" -->
        <data android:scheme="http"
              android:host="www.example.com"
              android:pathPrefix="/gizmos" />
        <!-- note that the leading "/" is required for pathPrefix-->
        <!-- Accepts URIs that begin with "example://gizmos" -->
        <data android:scheme="example"
              android:host="gizmos" />

    </intent-filter>
</activity>
$ adb shell am start
        -W -a android.intent.action.VIEW
        -d <URI> <PACKAGE>

$ adb shell am start
        -W -a android.intent.action.VIEW
        -d "example://gizmos" com.example.android

这篇关于Android-更新SDK版本23后,至少添加一个带有ACTION-VIEW Intent过滤器的Activity的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-30 19:50