编程语言
首页 > 编程语言> > android – 如何将已安装应用程序中的组件公开给即时应用程序?

android – 如何将已安装应用程序中的组件公开给即时应用程序?

作者:互联网

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

标签:android,android-instant-apps
来源: https://codeday.me/bug/20191006/1860534.html