On-demand dynamic feature module persistence under storage pressure
0 reputation · 11 Sept 2022, 18:56 UTC
On-demand dynamic feature module persistence under storage pressure
This Android App Bundle configures an on-demand dynamic feature module (dist:onDemand="true") using Android Gradle Plugin 8.0+ and Play Core 1.10+. The goal is to keep the module installed after SplitInstallManager.startInstall() completes so the app does not lose access to its resources and code at runtime.
The system may silently uninstall dynamic feature modules to free storage, and the documentation does not define the eviction policy, priority ordering, or whether user-requested installs are treated differently from deferred installs. No manifest flag such as dist:removable="false" applies to on-demand modules, and SplitInstallManager exposes no persistence API or uninstallation callback.
Behavior varies by Play Store version, Android API level, and OEM storage management, so a single-device test is not sufficient.
Is there a supported way to mark an on-demand dynamic feature module as non-removable? If not, what signals can the app rely on to detect silent uninstallation before the user attempts to use module functionality?