简体   繁体   中英

How to expose component from installed app to be visible to instant app?

From the developer document of Instant Apps

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

And later, it is mentioned that instant apps cannot

Discover the list of installed apps on the device, unless the installed apps have made themselves discoverable to instant apps .

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:

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

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

<meta-data android:name="instantapps.clients.allowed" android:value="true" />

More Info can be found here 3.15. Instant Apps

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM