Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/oop/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用显式意图的Android深度链接_Android - Fatal编程技术网

使用显式意图的Android深度链接

使用显式意图的Android深度链接,android,Android,目前我有两个网页,主页和关于。关于的是一个很深的链接,所以当我点击链接时,安卓给了我使用浏览器或我自己的应用程序打开该链接的选项。我想在我的应用程序中显式打开那个链接。我不想让应用程序列表处理它这可能吗?下面是我的代码: AndroidManifest.xml <activity android:name=".AboutPage" android:label="@string/about_page"> <intent-fi

目前我有两个网页,
主页
关于
。关于的
是一个很深的链接,所以当我点击链接时,安卓给了我使用浏览器或我自己的应用程序打开该链接的选项。我想在我的应用程序中显式打开那个链接。我不想让应用程序列表处理它这可能吗?下面是我的代码:

AndroidManifest.xml

    <activity
        android:name=".AboutPage"
        android:label="@string/about_page">
        <intent-filter android:label="@string/filter_name">
            <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="appindexing.robscv.info"
                  android:pathPrefix="@string/aboutHTML"/>
        </intent-filter>
    </activity>

简而言之

但是 它来了。 这是计划在中发布的功能

您所要做的就是将其添加到清单中

<intent-filter android:label="@string/filter_name" android:autoVerify="true">
   //...categories etc
</intent-filter>

//…类别等
更多信息


仅供参考,这实际上是直接深度链接到应用程序,如果用户手机上有多个应用程序
autoVerify
,则会弹出提示

<intent-filter android:label="@string/filter_name" android:autoVerify="true">
   //...categories etc
</intent-filter>