1

我在功能模块中声明了以下内容。我在移动设备中测试了即时应用程序,它运行成功。但是当我输入此 url 时,它不会导致即时应用程序。从 URL 启动即时应用程序的程序是什么。提前致谢

<data
   android:host="abc.cde.com"
   android:pathPattern="/hello"
   android:scheme="https"/>
4

1 回答 1

0

取自GitHub 上的 Android Instant Apps代码示例:

您要处理的活动需要这样的意图过滤器:

<intent-filter
        android:autoVerify="true"
        android:order="1">
    <action android:name="android.intent.action.VIEW" />
    <category android:name="android.intent.category.BROWSABLE" />
    <category android:name="android.intent.category.DEFAULT" />

    <data android:scheme="https" />
    <data android:scheme="http" />
    <data android:host="hello.instantappsample.com" />
    <data android:pathPrefix="/hello" />
</intent-filter>

主机和路径应与您要用作此 Instant App 功能入口点的 URL 匹配。

于 2017-09-28T11:21:41.730 回答