I struggle to define a good instant app architecture for my app. Currently the app is in an old style instant app structure. Right now I am converting it to dynamic modules. So far i have it working for the installable version. But I struggle to get the instant features working, because I don't know how to properly define an entry point. The app is single activity only and uses deeplinks to navigate. In the old instant app architecture I used to put in each feature module a seperate manifest.xml with its own activity. The installable module had something similar. Now with dynamic modules you have to point from the base manifest.xml to one single activity which should also be located in the same base module.
But this is not what I want. The installable activity is a lot different than the instant app one.
I have currently the following modules:
- Base
- Combined
- Feature_A
- Feature_B
- Feature_C
The combined module is basically the installable version of the app. It includes all the features modules and has one single activity. It also contains lots of extra functionality which is not needed in any feature module. Feature modules are just fragments and logic. Base module contains all shared logic.
Now I have the following questions:
Within the manifest.xml in the base module, the default activity has to be defined. It is right now pointing to my combined (installable) module's activity. Idealy for instant apps i want to have a different default activity. Is this possible?
I can create an activity inside the base module. But from there i cannot reach any class / activity in any module. So it is not an option to create an intermediate activity in the base module and from there, depending if its an instant or installed, load the right activity. How to deal with this?
Do I need to add entry points (url intent filters) in the base manifest or in each dynamic module?