nextcloud / android

📱 Nextcloud Android app
https://play.google.com/store/apps/details?id=com.nextcloud.client
GNU General Public License v2.0
4.21k stars 1.75k forks source link

[TOP] Enhance sync folders #285

Open tobiasKaminsky opened 8 years ago

tobiasKaminsky commented 8 years ago

As discussed on conf this is a collaboration between @AndyScherzinger and me. Purpose:

Cyber1000 commented 4 years ago

For me (Honor 8 with Emui 8/Android 8), it works without problems too, 100% for the last 6 months with mainly photos/videos. But I upload only on wifi and if connected to power and have disabled the aggressive power saving of honor 8 for this app.

lemmy04 commented 4 years ago

I'm sorry to be negative about it, but on all my devices "auto" upload means that for about 50% of all the pictures I take I have to manually open the nextcloud app, go to the "uploads" tab, and swipe down to refresh, to get the app to actually see the new pictures and realize that there are uploads to be done.

And there seems to be no logic behind then and why it happens...

The only connecting factor seems to be the fact that all my devices store their pictures on SD card, I could reactivate my old S6 that does not have one and see what happens on that one.

Janhouse commented 4 years ago

I noticed that on new Android devices if app doesn't have the "autostart" permission (which is not given by default), and if Nextcloud is off while the photo is taken, it never figures out that it has to upload something unless you open the app and try to refresh something. (Tested on Xiaomi device) So you have to give every sleep related permission to the app manually and then it seems to work more reliably.

Meanwhile on iOS the Nextcloud app uses some sort of geofence feature that works around the lack of "autostart" on iOS. Basically when the location changes, it is allowed to wake up and do some work for limited time.

I guess Android app has to be updated to be more in line with newer Android versions.

lemmy04 commented 4 years ago

I checked: on my most current device, a Samsung Tab S5e running Android 9, the app does have the autostart permission. What I don't have anymore on that device is the option of "locking" the running app so that "close all apps" leaves it alone, which sort of seems to be a working workaround on my phone...

rugk commented 4 years ago

I guess you issues generally are the heavy optimization of Android and especially some vendors trying to prevent high battery usage and thus stop/kill many, many apps. See https://dontkillmyapp.com/ for potential solutions or similar.

jospoortvliet commented 4 years ago

I think @rugk is right. This auto-upload feature works fine for the vast majority of phones, and isn't the thing we are discussing here - this topic was about full folder synchronization.

Sadly some phone vendors do crazy stuff that breaks auto upload, and it is near impossible to work around every weird thing every single vendor does PLUS keep up with all new weird things they do on new versions of their phones. If your phone is one where things don't work well and you want it fixed, complaining won't do much. Determine what is wrong and provide information - because we don't have your phone so we don't know what is wrong and how to fix it... At the very least, create an issue with as much info as possible - like, in what situations DOES it sync (when the app is running? When you disabled all powermanagement? etc), when it doesn't, and of course exactly what phone and software you use. Maybe a bit of googling can tell you or somebody else how to fix it and that fix might possibly be applied to our app.

Janhouse commented 4 years ago

@jospoortvliet, no, it does not really work fine on Android. It uploads only files created after auto upload was enabled. This means that if I have phone with lots of photos and I install Nextcloud, none of those images will be automatically uploaded. iOS app doesn't have this problem.

AndyScherzinger commented 4 years ago

@Janhouse this is known and has never been implemented and thus doesn't work on any device running Android. So this isn't even a Sync discussion while your point then simply is implementing existing pictures when auto upload is being activated.

What I don't know is how iOS client is handling this (technically speaking). Maybe somebody can shed some light on this?

jospoortvliet commented 4 years ago

@Janhouse yeah, I personally would also like that feature to be implemented, no doubt that'd be cool.

A full 'sync' that is two-way is very hard, but a one-time upload-all for a folder would be nice. Or even a dumb "upload unless file exists" or even just bloody overwrite them... would all be fine for me.

AndyScherzinger commented 4 years ago

A full 'sync' that is two-way is very hard, but a one-time upload-all for a folder would be nice. Or even a dumb "upload unless file exists" or even just bloody overwrite them... would all be fine for me.

As for "upload existing", there is #2873 while is a starting point but nobody has been able to get the people involved to an common understanding and agreement hwo this should wor exactly in the first place thus this feature is simply "pending".

Henry78 commented 4 years ago

What I don't know is how iOS client is handling this (technically speaking). Maybe somebody can shed some light on this?

I also am really interested!

Janhouse commented 4 years ago

Probably keeps list of files locally and marks which files don't have to be uploaded again. Android app on the other hand does this weird Cursor thing.

jospoortvliet commented 4 years ago

let me link to the successor PR: https://github.com/nextcloud/android/pull/4788

mjflower commented 4 years ago

I can't believe this is still an issue after all this time. I recently installed the app on the kids (have to have an apple because the school mandates it) devices and it uploaded all previously taken images without issue. Why can the android apps have this option, I don't get it.

jospoortvliet commented 4 years ago

I can't believe this is still an issue after all this time. I recently installed the app on the kids (have to have an apple because the school mandates it) devices and it uploaded all previously taken images without issue. Why can the android apps have this option, I don't get it.

Oh, it isn't so hard to understand. Why did you not write this feature?

No time? I can imagine. Happens to be true for everyone here, otherwise it had be done by somebody. I personally would love this feature, but I don't have time to learn programming and then do it. Hope that helps explain why it isn't done.

If you really want this done, you can do it, of course, your kids and everyone else will be very grateful if you did!

Until then, I'll close this discussion as it isn't going anywhere.

jospoortvliet commented 3 years ago

@tobiasKaminsky pretty much all of this is done, correct? Perhaps we can then close this issue?

AndyScherzinger commented 3 years ago

@jospoortvliet increments 5 and 6 are open