问题
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.)
回答1:
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
来源:https://stackoverflow.com/questions/45267816/how-to-expose-component-from-installed-app-to-be-visible-to-instant-app