我在功能模块中声明了以下内容。我在移动设备中测试了即时应用程序,它运行成功。但是当我输入此 url 时,它不会导致即时应用程序。从 URL 启动即时应用程序的程序是什么。提前致谢
<data
android:host="abc.cde.com"
android:pathPattern="/hello"
android:scheme="https"/>
我在功能模块中声明了以下内容。我在移动设备中测试了即时应用程序,它运行成功。但是当我输入此 url 时,它不会导致即时应用程序。从 URL 启动即时应用程序的程序是什么。提前致谢
<data
android:host="abc.cde.com"
android:pathPattern="/hello"
android:scheme="https"/>
取自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 匹配。