Skip to content Skip to sidebar Skip to footer

Handling Permissions: Making One Activity Of A Large App Into An Instant App

I have been asked to make an instant app module openable from play store in a base app which I am working on. The base app is large with lots of activities. It also uses many more

Solution 1:

In other words, can I declare the allowed permissions in the manifest file of the instant app module (instant/AndroidManifest.xml) even though the base app uses many more permissions?

Yes, you can declare permissions that only exist in your com.android.feature modules. It is done no different than in your main manifest, see an example from googlesamples/android-instant-apps/analytics/feature/AndroidManifest.xml

note: if this feature is also a part of the installed-app via implementation project(':feature') in the application module's gradle, then its manifest contents will be merged, permissions included, so you don't need to duplicate those permissions.

But as your permissions diversify between your instant and installed apps, you may run into Google Play Console error - Non-upgradable to installed app errors that you'll have to watch out for. Just make sure that your permissions, uses-feature, and uses-implied-feature (ie Play filters) are synced between them so that the targetable devices for your installed app is not narrower than your instant app.

Post a Comment for "Handling Permissions: Making One Activity Of A Large App Into An Instant App"