android
android copied to clipboard
New Autoupload feature kills battery
Actual behaviour
-After the rewrite of the autoupload feature, autoupload stopped working. Configuring it new, working as expected. However, it kills the battery in a matter of hours. 100% to 1% in 3-5h. This didn't happen in the previous version
Expected behaviour
-Tell us what should happen Battery should last longer
Steps to reproduce
Environment data
Android version: 6.0.1 (Samsung A3 2017, Stock) 7.1.1 (Galaxy S4 - LineageOS) Device model:
Stock or customized system:
Nextcloud app version: newest. Nextcloud server version: 11.0.2
Logs
Web server error log
Insert your webserver log here
Nextcloud log (data/nextcloud.log)
Insert your Nextcloud log here
Same issue
Hi. I'm experiencing similar symptoms on my Cat S60 running Android 6.0.1. Ever since I upgraded to the latest version of the Nextcloud Android app (1.4.2) the highest battery consumer each day has been nextcloud. I have multiple folders selected for auto upload, maybe that can influence it?
I personally experienced that problem with just one folder selected, the main camera folder.
Do you have enabled nextcloud sync on android system settings -> accounts -> nextcloud?
Do you have enabled nextcloud sync on android system settings -> accounts -> nextcloud?
no, this setting is disabled for me.
It was disabled for me too. I just activated it now and will report back if there is any change in a day or two. Thanks for looking in to this! Love what you are doing with the app! To be able to upload from more folders is amazing!
Same issue. Samsung Galaxy S7 Edge with Android 7.0. The samsung system is identifying Nextcloud every day as the only app draining the battery and ask me if I want to put it in sleep mode.
Autoupload drains my battery, too. Stock 7.0 on Galaxy S6.
Hi, Same issue here : Nextcloud draining battery on Galaxy s7 android 7.0. The samsung system is identifying Nextcloud every day as the only app draining the battery and ask me if I want to put it in sleep mode.
Dear users,
thank you for your patience. After lots of work, we’re super excited to be able to give you a test version with new auto upload implementation. Keep in mind we will only accept bugs related to Auto Upload in this APK, as other things might be broken.
https://cloud.nextcloud.com/s/ftZraTruRQjTe0R
This is a dev APK so it will not overwrite your existing play store/f-droid APK unless you’re already running dev version. Also, you might need to remove your existing dev version before installing this one.
Explanation of the current functionality:
- added support for custom folders
- separated image and video folders
- checks for new files happens every 15-20 minutes
- automatic retry every 15-20 minutes or when you force close/open the app
- automatic pause once network is changed (untested!)
- significantly less battery usage
All and any testing is more than appreciated, especially with large and ever-going files like Videos. (like, try to record a 30 min video).
Let me know if you’ve got any questions.
Cheers, Mario
I installed this dev app. But now my auto upload has stopped working. I enabled The sync in the android account settings. Not working. I taken some photos and videos. Switched off the phone and waited a bit. But it does not upload anything :(
@aPollO2k which version have you installed? There is now a release candidate for the upcoming version available at beta channel on google play store: https://play.google.com/apps/testing/com.nextcloud.client
Please try this one as this includes the latest fixes.
I'm having the same issue, and am running 2.0.0 (seems beta and production versions are the same, I wasn't upgraded after joining the testing program).
I'm getting constant warnings it's draining over 1% of my battery per hour. And the only thing I want the android app for is auto uploading my pics.. Any update on a fix for this?
I also must confirm, since 3.0.1, upload seems to drain battery. Problem with android 8.1 on Nexus 6p.
Upload or the notification that's persistently there?
@olenz same on Samsung s8
Still draining the battery on Galaxy S7 Edge. Taking 10% of the battery usage in the current use cycle for instance according to battery usage stats. No other app even close. Screen and Android System only processes using more battery (16 and 13% respectively).
Same here
Any progress on this? Unfortunately I need to uninstall and stop using the app. Draining my battery very fast. The same with my partners phone.
This request did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!
Nextcloud is draining my battery too.
Same problem here... I am using Wakelock Detector on a Stock ROM of a Galaxy S7 to monitor battery usage.
3h45m after turning on my phone, the Nextcloud app was active for 35m11s. No other app is remotely close to the Nextcloud app's runtime. The second app in line ran for 36s during that time. The battery is down to 87% while the phone was sitting idle on my desk.
edit The phone battery was at 100% when it was turned on.
I am testing right now with a S5 Neo with Wakelock Detector if and how often our app requests wakelock.
@Rayn0r this is strange. According to our code we do not acquire wake lock if the device is at least Lollipop (Android 5.0).
What exactly is it in WakeLock Detector?
- Screen WakeLock
- Cpu WakeLock
- WakeUp Trigger?
I let the phone sit on my desk this morning again.
This is a screenshot of the CPU Wakelock:
Still draining the battery on Galaxy S7 Edge. Taking 10% of the battery usage in the current use cycle for instance according to battery usage stats. No other app even close. Screen and Android System only processes using more battery (16 and 13% respectively).
Any update on this? Now, almost 2 years later, I'm on a Galaxy S10 with Android 10 and Nextcloud auto upload is still (!) draining the battery pretty much like in the picture above. I auto upload both camera images, videos etc. but also custom folders like WhatsApp images. I have the setting to only auto upload when charging and on wifi, still Nextcloud is draining my battery all day long. Why? It should only be activated when plugged in and on wifi.
Only way to stop the battery drain is:
- Enable battery optimization for the Nexcloud app in Android (i.e. don't let Nextcloud run in the background) but then the auto upload obviously never starts when you plug in the charger.
- Disable auto upload
I think the solution here is to find the issue in the code that makes the Nextcloud app check for uploadable items all the time (keeping the phone awake) even if it should only do so when charging according to the user settings. In pseudo code just to clarify what I'm meaning:
If (notCharging && onlyAutoUploadWhileChargingUserSetting) {
skipCheckForFilesToAutoUpload = true;
}
Then the battery should probably not drain.
I can't believe this bug is still open after three years. Every now and then I try the Nextcloud app, and always I give it up because it kills the battery (several Samsung phones running LineageOS). However, the only WebDAV sync alternative (FolderSync) for Android is kind of dead, so the need for a client gets more urgent.
As mentioned above, even using restrictive conditions for upload does not help, as Nextcloud seems to start nevertheless if any media is changed on the configured folders.
I would even go with a periodic sync or a manual sync (controllable e.g. by Tasker) if it is not possible to restrain the battery usage of the app itself.
Looks like guys are short handed if even after three years bug is still open :( 47% battery drain in a day. For now I see - only one option:
- disable entirely autoupload and background tasks
- use alternative sync app
@xdaWhitealien
- disable entirely autoupload and background tasks
I can't find such an option in the app. Can you explain how to do this?
- use alternative sync app Can you recommend one?
How many files are getting uploaded? Roughly how many files do you have on your device? It might be that scanning takes too long.
I would need one person who is suffering from this, and is willing to test a few apks and give me logcat info.