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

标签 android android-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

关于android - 如何将已安装应用程序中的组件公开给即时应用程序可见?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45267816/

相关文章:

android ListView onItemClick

java - 当 Firestore 中不可用时过滤搜索列表

android - 在我的 android 应用程序上,即使我从数据库中获得真实值(value),我也无法登录

java - 即时应用程序 : How to add external libraries?

android - 无法运行 TensorFlow 推理

android - 如何在 android O 的系统设置中对通知 channel 进行排序

android - 是否可以在模拟器上使用已发布的即时应用程序(BuzzFeed、Wish 等)?

Android Instant 应用程序未显示

android - 您必须将 http 和 https 协议(protocol)用于 intent 过滤器。为什么会收到此错误消息?