remove background blurring feature - #5658
Merged
Merged
Conversation
So unfortunately the big size of the talk app is caused by the background blur feature. The model itself is not a problem (selfie_segmenter.tflite is "only" 249,5 KB). But the dependencies implementation 'com.google.mediapipe:tasks-vision:0.10.26' implementation 'org.opencv:opencv:4.12.0' will result in the shared object libraries libopencv_java4.so libmediapipe_tasks_vision_jni.so and i guess also libc++_shared.so Together they are about 145 MB which explains most of the increased size. Of course there are options to reduce apk sizes but this wont be able to compensate this high number. One option would be to offer split apks or switch to AAB, but this would make the shipping complicated esp if we want to offer the app as direct downloads. Build process will be more complicated, People will be confused which apk they have to use or how to get the downloaded aab as app on their phone, branding will be more complex, testing will be harder and so on... So far i did not find any post from google for plans to require also existing apps to migrate to AAB, so apk should still be future proof. One other option to reduce the size is to drop support for x86. I tried this while keeping the background blur feature and ended up with 128 MB. But as Google limits the upload size for apps to 100MB this may not help unless we further optimize with proguard etc. We are already at 107 MB for the last releases that don't have the background blurring feature, so even without the feature we may have to act anytime soon, it was just luck google did not complain (maybe other calculation of MB's..). Dropping support for x86 may be problematic for older ChomeOS systems but nevertheless they should still be able to use the app with arm translation: https://developer.android.com/topic/arc/device-support?utm_source=chatgpt.com#arm-translation. From the numbers, dropping support for x86 should be fine (screenshot will follow. i don't think the "Unreported ABI" should contain many x86 devices?) So while mentioning the dropping support for x86: If dropping is an option AND we would remove the blurring feature as well, we should end up at about ~60MB apk size (did not test yet) which should be future proof for us. There is also the option to use packagingOptions { jniLibs { useLegacyPackaging true } https://developer.android.com/guide/practices/page-sizes?utm_source=chatgpt.com#agp_version_85_or_lower I tried this and ended up with 140MB while keeping the blurring feature. So still too big and using the useLegacyPackaging is not recommended nowadays. It will most likely cause problems for the future, so it's not a good idea. So to be honest i think removing the background blurring feature will unfortunately be the best option. Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
mahibi
force-pushed
the
removeBackgroundBlurring
branch
from
December 19, 2025 15:18
0a638b5 to
7da13c0
Compare
Contributor
|
APK file: https://www.kaminsky.me/nc-dev/android-artifacts/5658.apk |
Contributor
rapterjet2004
approved these changes
Dec 19, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This will revert
Unfortunately the background blurring feature increases the app size a lot so we can't release with the current apk file format via google play.
For now, the feature is removed.
see #5653 (comment)
🏁 Checklist
/backport to stable-xx.x