Skip to content

Conversation

@mahibi
Copy link
Collaborator

@mahibi mahibi commented Dec 19, 2025

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

  • ⛑️ Tests (unit and/or integration) are included or not needed
  • 🔖 Capability is checked or not needed
  • 🔙 Backport requests are created or not needed: /backport to stable-xx.x
  • 📅 Milestone is set
  • 🌸 PR title is meaningful (if it should be in the changelog: is it meaningful to users?)

@mahibi mahibi added this to the 22.1.0 milestone Dec 19, 2025
@mahibi mahibi self-assigned this Dec 19, 2025
@mahibi mahibi added the 3. to review Waiting for reviews label Dec 19, 2025
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 mahibi force-pushed the removeBackgroundBlurring branch from 0a638b5 to 7da13c0 Compare December 19, 2025 15:18
@github-actions
Copy link
Contributor

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/5658.apk

qrcode

To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.

@github-actions
Copy link
Contributor

Codacy

Lint

TypemasterPR
Warnings9999
Errors00

SpotBugs

CategoryBaseNew
Bad practice66
Correctness1010
Dodgy code5454
Internationalization33
Malicious code vulnerability33
Performance44
Security11
Total8181

@mahibi mahibi merged commit df8540c into master Dec 19, 2025
16 of 17 checks passed
@mahibi mahibi deleted the removeBackgroundBlurring branch December 19, 2025 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants