Skip to content

feat(auto-upload): ignore battery optimization with sync now - #17396

Merged
alperozturk96 merged 14 commits into
masterfrom
feat/bypass-battery-optimization
Sep 1, 2026
Merged

alperozturk96 merged 14 commits into
masterfrom
feat/bypass-battery-optimization

Conversation

@alperozturk96

@alperozturk96 alperozturk96 commented Jul 30, 2026 •

Copy link
Copy Markdown
Collaborator

Implements:

Screenshot 2026-07-31 at 15 19 23

App's shows a banner if device is in power save mode and this affects the auto upload behaviour such as delays.

This PR adds "Sync now" button inside the banner to re-trigger auto upload via bypassing the battery optimization.

#7019

@github-actions

Copy link
Copy Markdown

@rain1

rain1 commented Aug 3, 2026

Copy link
Copy Markdown

Can this button be accessed also without putting phone in power save mode?

@alperozturk96

Copy link
Copy Markdown
Collaborator Author

Can this button be accessed also without putting phone in power save mode?

No and this button only re-trigger auto upload via bypassing the battery optimization. It does not ignore every check and try to force upload every file.

@alperozturk96
alperozturk96 force-pushed the feat/bypass-battery-optimization branch from 9b404be to c6a973b Compare August 12, 2026 06:59
@github-actions

Copy link
Copy Markdown

APK file: https://github.com/nextcloud/android/actions/runs/31572128059/artifacts/9131895982
To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.
qrcode (please click on link to get QR code displayed)

@rain1

rain1 commented Aug 15, 2026

Copy link
Copy Markdown

APK file: https://github.com/nextcloud/android/actions/runs/31572128059/artifacts/9131895982 To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app. qrcode (please click on link to get QR code displayed)

It says 404 when visiting mobile browser, even when I request desktop site.

@alperozturk96
alperozturk96 force-pushed the feat/bypass-battery-optimization branch from c6a973b to 52581fa Compare August 17, 2026 06:04
@github-actions

Copy link
Copy Markdown

APK file: https://github.com/nextcloud/android/actions/runs/32000183161/artifacts/9278348478
To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.
qrcode (please click on link to get QR code displayed)

@alperozturk96
alperozturk96 force-pushed the feat/bypass-battery-optimization branch from 52581fa to 3f391f5 Compare August 19, 2026 06:09
@github-actions

Copy link
Copy Markdown

APK file: https://github.com/nextcloud/android/actions/runs/32222236432/artifacts/9354451949
To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.
qrcode (please click on link to get QR code displayed)

@daniele-verducci

This comment was marked as resolved.

@daniele-verducci

This comment was marked as resolved.

@alperozturk96
alperozturk96 force-pushed the feat/bypass-battery-optimization branch from 3f391f5 to 1912c1c Compare August 19, 2026 13:47
@github-actions

Copy link
Copy Markdown

APK file: https://github.com/nextcloud/android/actions/runs/32260099087/artifacts/9368106934
To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.
qrcode (please click on link to get QR code displayed)

@alperozturk96

This comment was marked as resolved.

@github-actions

Copy link
Copy Markdown

APK file: https://github.com/nextcloud/android/actions/runs/32261113774/artifacts/9368853506
To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.
qrcode (please click on link to get QR code displayed)

@alperozturk96
alperozturk96 force-pushed the feat/bypass-battery-optimization branch from 5792b51 to a76a05d Compare August 20, 2026 11:51
@github-actions

Copy link
Copy Markdown

APK file: https://github.com/nextcloud/android/actions/runs/32365959689/artifacts/9405461598
To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.
qrcode (please click on link to get QR code displayed)

@alperozturk96

This comment was marked as resolved.

@daniele-verducci

This comment was marked as resolved.

@github-actions

Copy link
Copy Markdown

APK file: https://github.com/nextcloud/android/actions/runs/32368304545/artifacts/9406869650
To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.
qrcode (please click on link to get QR code displayed)

Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
@alperozturk96
alperozturk96 force-pushed the feat/bypass-battery-optimization branch from d66919e to e9adcdc Compare August 21, 2026 06:44
@github-actions

Copy link
Copy Markdown

APK file: https://github.com/nextcloud/android/actions/runs/32455639091/artifacts/9437278191
To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.
qrcode (please click on link to get QR code displayed)

Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
@github-actions

Copy link
Copy Markdown

APK file: https://github.com/nextcloud/android/actions/runs/32458705183/artifacts/9438313833
To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.
qrcode (please click on link to get QR code displayed)

Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
@github-actions

Copy link
Copy Markdown

APK file: https://github.com/nextcloud/android/actions/runs/32460236194/artifacts/9438834797
To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.
qrcode (please click on link to get QR code displayed)

…erver work

Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
…erver work

Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
@github-actions

Copy link
Copy Markdown

APK file: https://github.com/nextcloud/android/actions/runs/32465338188/artifacts/9440607044
To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.
qrcode (please click on link to get QR code displayed)

@github-actions

Copy link
Copy Markdown

Codacy

SpotBugs

CategoryBaseNew
Bad practice3232
Correctness5959
Dodgy code207207
Experimental11
Malicious code vulnerability22
Multithreaded correctness2525
Performance3939
Security1919
Total384384

@github-actions

Copy link
Copy Markdown

blue-Light-Screenshot test failed, but no output was generated. Maybe a preliminary stage failed.

@daniele-verducci

Copy link
Copy Markdown
Contributor

Hey, tested last version that checks if the job is still running and works as intended. ✅
Definitely an upgrade!

@alperozturk96
alperozturk96 merged commit 9741714 into master Sep 1, 2026
21 of 23 checks passed
@alperozturk96
alperozturk96 deleted the feat/bypass-battery-optimization branch September 1, 2026 06:34
@regs01

regs01 commented Sep 8, 2026 •

Copy link
Copy Markdown

@alperozturk96
You marked #7019 as completed with this MR, but it is unrelated.

@alperozturk96

Copy link
Copy Markdown
Collaborator Author

@alperozturk96 You marked #7019 as completed with this MR, but it is unrelated.

Screenshot 2026-09-08 at 08 04 26

The feature request is related to “When putting Android into power saver mode, add a ‘force upload/sync’ button to automatic uploads”, but it should not be interpreted as a request to add a “force upload/sync” button to automatic uploads in general.

As the user described, they need to exit power saver mode first, after which the automatic upload will be triggered. Therefore, this issue is specifically related to the worker exiting early due to power management limitations.

The force button should only bypass the power management limitation of the worker, rather than bypassing all other limitations or restrictions.

@regs01

regs01 commented Sep 9, 2026 •

Copy link
Copy Markdown

@alperozturk96 You marked #7019 as completed with this MR, but it is unrelated.

The force button should only bypass the power management limitation of the worker, rather than bypassing all other limitations or restrictions.

#7019 wasn't about bypassing powersaving, but about havinmg manually trigger autoupload on demand in general. Powersaving was just an example of one of many instances, when it needed. Most issues about auto autoupload on demand button were closed as duplicate of #7019 - #13923, #11448, #16241, #582, #818, #16354 etc. This MR doesn't add that button. It only allowing bypass powersaving when autoupload already initiated itself.

@rain1

rain1 commented Sep 11, 2026

Copy link
Copy Markdown

@alperozturk96 You marked #7019 as completed with this MR, but it is unrelated.

The force button should only bypass the power management limitation of the worker, rather than bypassing all other limitations or restrictions.

#7019 wasn't about bypassing powersaving, but about havinmg manually trigger autoupload on demand in general. Powersaving was just an example of one of many instances, when it needed. Most issues about auto autoupload on demand button were closed as duplicate of #7019 - #13923, #11448, #16241, #582, #818, #16354 etc. This MR doesn't add that button. It only allowing bypass powersaving when autoupload already initiated itself.

I find it interesting how much effort NC developers are willing put in to avoid doing what users actually want. If all that time that have been spent on marking issues duplicates had be invested in implementation instead, not only would that button be there but also all the bugs would have been fixed by now.

@lntegrity

lntegrity commented Sep 22, 2026 •

Copy link
Copy Markdown

Good morning. I updated from 34.1.1 to 35.0 last night (whatever is the latest in F-Droid).

I keep my phone on Power Save at all times. I've configured my library so some folders wait for Power Save before auto-uploading, and others don't.

When I woke up this morning, EVERY folder (including those previously flagged for Wait For Power Save) had uploaded to my NextCloud. Now I have to go and delete all the unwanted files, clean up the metadata, etc. I intentionally DON'T upload every file instantly, because I do tasks locally on my phone first, like metadata tagging, editing dates, moving to subfolders, etc). So this just cost me hours of work.

Further, the "Wait for Power Save" flag/checkbox is gone from the folder > Auto Upload settings.

Is this intentional? I literally hit "Update all apps" in F-Droid and went to sleep, so I never saw, nor pushed, any "Force Update" button. So why did I awake to NextCloud auto-uploading everything that was pending, despite Power Save being enabled, and despite not pushing a Force Update button? And why is the Power Save setting missing (replaced, apparently, with "Only upload when charging" which is very much not the same feature)?

And I hesitate to uninstall 35 and reinstall 34.1.1, because I don't want to trash my configuration and have to re-configure all the folder settings with respect to the auto-upload flag. Though I fear that setting may have been erased anyway...?

Thank you...

EDIT: Adding @alperozturk96 , @daniele-verducci - Sorry if @mentioning is inappropriate, figured I'd keep visibility within this existing PR instead of creating something new. Please let me know if I should go another route.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a 'force upload/sync' button to automatic uploads

6 participants