I am working on an Android project where I need to create a dynamic delivery module. However, during the module creation, I am presented with the following options:
Do not include module at install-time (on-demand only)
Include module at install time
Only include module at install-time for devices with specified features
My requirement is as follows: If a certain condition is true during the creation of a release build (AAB or APK), I want the module (let's call it Module A) to be present in the base APK, i.e., include the module at install time. If the condition is false, Module A should be a dynamic module, i.e., do not include the module at install time (on-demand only).
Is there any way to achieve this conditional inclusion of a module at install time based on a certain condition during the build process?
My condition is if we are building an apk (then include all module A which is dynamic module) else if we are building aab file then don't do anything since the module A is already dynamic
so I finally did it in the following way
inside android tag
inside dependency tag
condition can be anything, you want, a property or a Fastlane or as i said anything you want