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.)
Instant-app enabled app bundles can only use few app permissions, such as ACCESS_COARSE_LOCATION , ACCESS_FINE_LOCATION , ACCESS_NETWORK_STATE , CAMERA , INSTANT_APP_FOREGROUND_SERVICE [only in Android 8.0 (API level 26) and higher], INTERNET , READ_PHONE_NUMBER , RECORD_AUDIO , VIBRATE , and WAKE_LOCK .
An app will send a notification to ask for permission to use features on your phone, which you can Allow or Deny. You can also change permissions for a single app or by permission type in your phone's Settings.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With