Hello everyone,
We are currently developing a custom APK on top of the DHIS2 Android Capture App to address specific PreHospital implementation needs. One of the main challenges we’re facing is the large APK size, which makes distribution difficult in low-bandwidth environments.
We’d really appreciate advice and shared experiences from the community on the following:
-
Code and resource shrinking – Has anyone successfully reduced the Capture App (or custom forks) APK size using R8/ProGuard minification (
minifyEnabled = true
) and resource shrinking (shrinkResources = true
)? If so, what impact did it have on the final build size, and were there any issues with missing classes or resources? -
Large assets – Are there recommended best practices for handling or optimizing large assets (e.g., media, images, fonts) within the Capture App context?
-
Gradle configuration – We’re currently experimenting with these optimizations in the
app/build.gradle.kts
release build type and would value insights from anyone who has managed to deploy a lightweight build of the Capture App.
Any guidance, lessons learned, or references to previous work in this area would be greatly appreciated.
Thanks in advance!