如何将已安装的应用程序中的组件公开以显示给即时应用程序? [英] How to expose component from installed app to be visible to instant app?

查看:176
本文介绍了如何将已安装的应用程序中的组件公开以显示给即时应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

来自 Instant Apps开发人员文档

已安装的应用程序可以通过明确的意图使其自身与即时交互.

Installed apps can make themselves available to interact with instant through explicit intents.

后来,有人提到即时应用程序不能

And later, it is mentioned that instant apps cannot

发现设备上已安装应用程序的列表,除非已安装的应用程序使自己可以被即时应用程序发现.

但是,我无法找到有关如何公开安装的应用程序的组件或应用程序的任何部分的详细信息,以使即时应用程序可以看到(和访问)该组件.对此有任何限制吗?(支持的组件类型等)

But I can't find the details about how to expose the component of an installed app or any part of an app, for that matter, to be visible (and accessible) by instant app. And any limitation on that? (supported component types and etc.)

推荐答案

最后,我弄清楚了语法:

At last, I figured out the syntax:

对于 Android O + ,您可以为组件指定 android:visibleToInstantApps ="true" .

For Android O+, you can specify android:visibleToInstantApps="true" to the component.

对于较低版本的Android,请将此元数据添加到您的< application> 中(不适用于组件):

For lower version of Android, add this meta-data to your <application> (not working for components):

<元数据android:name ="instantapps.clients.allowed" android:value ="true"/>

更多信息可在此处找到 3.15.即时应用

More Info can be found here 3.15. Instant Apps

这篇关于如何将已安装的应用程序中的组件公开以显示给即时应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆