如何将已安装应用程序中的组件公开给即时应用程序可见?
How to expose component from installed app to be visible to instant app?
来自developer document of Instant Apps
Installed apps can make themselves available to interact with instant through explicit intents.
后来又提到免安装应用不能
Discover the list of installed apps on the device, unless the installed apps have made themselves discoverable to instant apps.
但我找不到有关如何公开已安装应用程序的组件或应用程序的任何部分的详细信息,就此而言,免安装应用程序可见(和可访问)。对此有什么限制吗? (支持的组件类型等)
最后,我弄明白了语法:
对于Android O+,可以给组件指定android:visibleToInstantApps="true"
。
对于较低版本的 Android,将此元数据添加到您的 <application>
(不适用于组件):
<meta-data android:name="instantapps.clients.allowed" android:value="true" />
可以在此处找到更多信息3.15. Instant Apps
来自developer document of Instant Apps
Installed apps can make themselves available to interact with instant through explicit intents.
后来又提到免安装应用不能
Discover the list of installed apps on the device, unless the installed apps have made themselves discoverable to instant apps.
但我找不到有关如何公开已安装应用程序的组件或应用程序的任何部分的详细信息,就此而言,免安装应用程序可见(和可访问)。对此有什么限制吗? (支持的组件类型等)
最后,我弄明白了语法:
对于Android O+,可以给组件指定android:visibleToInstantApps="true"
。
对于较低版本的 Android,将此元数据添加到您的 <application>
(不适用于组件):
<meta-data android:name="instantapps.clients.allowed" android:value="true" />
可以在此处找到更多信息3.15. Instant Apps