nextcloud / android

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

[TOP] Enhance sync folders #285

Open tobiasKaminsky opened 7 years ago

tobiasKaminsky commented 7 years ago

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

AndyScherzinger commented 6 years ago

@korelstar with Android limiting external file access more and more with each OS release the issue is that sync would also mean that you can sync a deletion (or not sync a deletion) since many people might want the files to be backed up but no action upon local deletion. So having a real sync on external folders is likely to break sooner or later due to OS changes.

bam80 commented 6 years ago

Sorry for interpose, has anybody considered SyncML as a solution for 2-way sync?

AndyScherzinger commented 6 years ago

@bam80 no, everything is based on WebDAV/CalDAV/CardDAV

ThaDaVos commented 6 years ago

If this is done for Android, will this also be done for iOS? To keep them the same? As of now Android is at 3.x and iOS 2.x last time I checked

altek86 commented 6 years ago

any luck yet with Increment 3?

mario commented 6 years ago

No. I have instead implemented increment 4.

javaisbetterthanpython commented 6 years ago

@mario @AndyScherzinger is there a sketched-out plan for implementing Increment 3? What would be necessary to complete this? Any pseudocode available? I recall reading one comment on here somewhere that references a specific class that would be a good place to start, but I checked and didn't see that class existing in the current source.

javaisbetterthanpython commented 6 years ago

cc @tobiasKaminsky

jospoortvliet commented 5 years ago

@mario @AndyScherzinger is there a sketched-out plan for implementing Increment 3? What would be necessary to complete this? Any pseudocode available? I recall reading one comment on here somewhere that references a specific class that would be a good place to start, but I checked and didn't see that class existing in the current source.

Isn't that what the re-scan feature does? @tobiasKaminsky

jj-uk commented 5 years ago

"Uploads -> Force rescan" appears to do nothing at all for me.

Android 5.1.1 / Samsung J3 2016

Nextcloud app v3.2.0

Nextcloud server v13 (can't see actual version in GUI anywhere?)

EDIT: 13.0.5 (found in admin account)

ftastisch commented 5 years ago

As the app description in the Playstore/FDroid includes "Keep your favorite files and folders synced" I was surprised that there is still no auto-sync for mobile devices. This would be increment 6, right? Are there current plans for implementation?

jj-uk commented 5 years ago

Sync is there and it works. Menu - all files - ... - sync

Auto upload doesn't seem to work correctly though. And foreceive rescan does nothing all all.

ftastisch commented 5 years ago

@jj-uk [Either] I'm blind or meant something different: Is there currently an option to have the android app update (automatically in the background) the files on the smartphone if there have been changes on the server?

Janhouse commented 5 years ago

Auto upload in Android app is currently buggy and doesn't allow pushing all of the files after initial setup. Also if you change settings for auto upload folders, they won't be used for already existing files in the queue and since there is no "push all files to cloud" button, there seems to be no good way of uploading those files. This "roadmap" has been here for almost two years now. Not sure if Nextcloud lacks developers and funding or they don't prioritize Android because this functionality works great in the iPhone app.

It is weird because I thought that Android is the most used mobile platform in the world and that most people (not organizations though) using private cloud want to automatically back up photos from their phones to their private cloud.

There is a pull request #2873 that should fix auto uploading but it seems to be stuck there for now.

rugk commented 5 years ago

Not sure if Owncloud lacks developers and fundin

You mixed up companies here. :smile:

Janhouse commented 5 years ago

Haha, sorry, I still mix up the names. :laughing:

jj-uk commented 5 years ago

All the database tables still use oc_ prefixes... someone should open a enhancement request for that lolz

m1cm1c commented 5 years ago

Auto upload in Android app is currently buggy and doesn't allow pushing all of the files after initial setup.

This is currently my biggest problem with it. Is there a workaround? Or perhaps a different app to do the job in the meantime? Furthermore, when I set up a custom folder (requires "expert mode" to be enabled), it sometimes doesn't even sync additions.

madorian commented 5 years ago

Auto upload in Android app is currently buggy and doesn't allow pushing all of the files after initial setup.

This is currently my biggest problem with it. Is there a workaround? Or perhaps a different app to do the job in the meantime? Furthermore, when I set up a custom folder (requires "expert mode" to be enabled), it sometimes doesn't even sync additions.

syncthing is a different app that works great, while we wait;)

Bugsbane commented 5 years ago

syncthing is a different app that works great, while we wait;)

Will Nextcloud server be aware of files copied to the server by Syncthing? Do you set up a cron job to scan for new files every 5 minutes, or is there a more elegant way?

ajvsol commented 5 years ago

2-way sync is especially necessary now that Nextcloud 14 supports client-side encrypted folders. I've been using FolderSync for a long time but it can only support unencrypted files.

Fabian42 commented 5 years ago

@neomodern Do you mean you used FolderSync with NextCloud? I don't find an option for that in my FolderSync app.

m1cm1c commented 5 years ago

@Fabian42 I simply chose the latest version of OwnCloud supported by FolderSync. It works.

ajvsol commented 5 years ago

^ yes, what he said

Fr3shF1sh commented 5 years ago

Autoupload does not work stable on Android 7. App is excempt from battery optimization. Even when I force a rescan under Uploads it will not work. Probably because I don't start with empty folders. But even when I start with empty folders it only works very seldom automatic. Most of the time I have to force a rescan in the Uploads menu.

Dmitra commented 5 years ago

same for Android 8. In addition a had an issue with uploading photos to two folders simultaneously. Specified custom location and the folder which was in the setting by default: "InstantUpload/Camera"

thrdroom commented 5 years ago

At the current state of development, how far away are we from getting fully functional Increment 5 and Increment 6? I want to go fully FOSS(fdroid apps only) and as FolderSync Pro is a paid PlayStore only app, i can't use it nor can i use the nextcloud app without fully functional Increment 5 and Increment 6 features. I don't want to push anyone, im just curious about the status of this two most important features.

apalacheno commented 5 years ago

Fully OT: You may use Syncopoli (from F-Droid) as a temporary workaround. Granted; it is a very minimal solution and not really comparable to the wealth of features of NextCloud or FolderSync, but it allows for basic, automatic and robust one-way-sync.

Setting up syncopoli is a bit tedious; the following tips may get you started:

In the settings of Syncopoli the following additional options have proven to be useful:

-vHrlt --no-perms --delete-excluded --progress

Careful: with --delete-excluded this does a true sync, i.e. all files on the target will get deleted that are not present on the source! Another gotcha is that the private key needs to be in dropbear format.

Set up a profile with the following options:

Sorry for being off-topic, but having a basic and FOSS-compatible way to sync things between phone and desktop/server is something people reading this bug report may be interested in until Increments 5+6 have been implemented.

JorisFRST commented 5 years ago

Hi,

is there a timeline for ?

Increment 3 - upload existing files add "upload/sync all existing images/videos/files" as an option to the auto upload folder three-dot menu.

PetrVladimirov commented 5 years ago

It's probably worth to mention that there is a bounty for this particular issue, another for very similar one and one more for another very similar, totalling $500+

@tobiasKaminsky @AndyScherzinger do you think it may help to put additional focus on this issue? Probably at least adding relevant tags and links may increase donations... BTW many thanks for making these features real!

AndyScherzinger commented 5 years ago

Don't know actually... I don't have enough spare time at the moment to spend on developing larger features and I can't tell what @tobiasKaminsky or @ezaquarii might be focusing on.

drkmccy commented 5 years ago

Would this include a simple "keep folder in sync" option? For folders that contain important and time critical files, it is important for those files to be delivered ASAP. It might be worth opening a new feature request, but maybe like a "high priority" option where files or folders with that label are synced instantly no matter what.

klawdhfzasjhaa commented 5 years ago

Would this include a simple "keep folder in sync" option? For folders that contain important and time critical files, it is important for those files to be delivered ASAP. It might be worth opening a new feature request, but maybe like a "high priority" option where files or folders with that label are synced instantly no matter what.

That's what I would expect when "starring" a file or folder in the app.

cantalupo555 commented 5 years ago

Auto upload in Android app is currently buggy and doesn't allow pushing all of the files after initial setup. Also if you change settings for auto upload folders, they won't be used for already existing files in the queue and since there is no "push all files to cloud" button, there seems to be no good way of uploading those files. This "roadmap" has been here for almost two years now. Not sure if Nextcloud lacks developers and funding or they don't prioritize Android because this functionality works great in the iPhone app.

It is weird because I thought that Android is the most used mobile platform in the world and that most people (not organizations though) using private cloud want to automatically back up photos from their phones to their private cloud.

There is a pull request #2873 that should fix auto uploading but it seems to be stuck there for now.

I have this same problem, it only performs auto upload of the files that are after the installation and configuration of the APP, the old photos and videos (created before the installation) are not being uploaded.

Janhouse commented 5 years ago

This is why I don't use the Nextcloud App on Android devices. What is the point of the app if it can't sync already existing files? iOS app devs have solved this issue long, long time ago.

If the already existing pull request contains bad code, why don't you just close it and remove the "has pull request" tag from this case? It seems like someone is working on it, while in reality there is only one commit made a year ago and no one is actually looking into it.

nazzario commented 5 years ago

The Thread is open 2 Years now. I Could remember the nextcloud android automatically never has worked. 2 Years later I have the same issue. Please fix that on android. I want to backup my Photos. Device: Xiaomi Mi 9 / Android 9 / Nextcloud Version 3.6.2 Please fix

ghost commented 5 years ago

that is not exactly true, nextcloud android client automatically uploads data appearing in a setup directory after its setup, this is a limitation which i can live with - to work around it, you just need to manually upload already existing directory content, however i agree that this bug is specially confusing and annoying for new users who then could have easily give up on the nextcloud.

Janhouse commented 5 years ago

@tobiasKaminsky how about removing the "pr exists" tag and rejecting it finally?

mgutt commented 5 years ago

Still waiting for "Increment 3 - upload existing files" and "Increment 4 - folder upload". Uploading existing files should be a default setting. I do not see a reason why it should exist a setting to disable this. I would pay for both features. Maybe you think about a paid version of the client that gets such features x month before the free version.

javaisbetterthanpython commented 5 years ago

tobiasKaminsky opened this issue on Sep 21, 2016

Wow this has been open for a long time. What is required to make this actually get done? It seems like a very popular and commonly requested feature.

nazzario commented 5 years ago

That's true that the sync working after first install. But it's not a really user experience. The function that you can select the Folders for sync are great and give the name too. But I have a lot of work to look which Photos etc. I want to sync because the older one will not automatically sync that is not really nice. I really hope that you can fix but as the comments from other people told the issue is open for two years.

Henry78 commented 5 years ago

What is required to make this actually get done?

You could increase the bounty: https://github.com/nextcloud/android/issues/285#issuecomment-491605209

mgutt commented 5 years ago

What is required to make this actually get done?

You could increase the bounty: #285 (comment)

Thanks for the info. Why aren't bountysource links part of the issue description? I sent 15$ and created a google play store review with a hint to bountysource and will post in relevant forum threads.

Janhouse commented 5 years ago

@Henry78, @mgutt , I doubt it will help in any way since existing developers are already employed by Nextcloud and they get paid more than that. There is an open pull request with bad code that hasn't been rejected or reworked in years, suggesting that current Android developer team has too much to do and they are drowning in cases, unable to deal with all the things going on in these cases. There are probably also no project managers that would go through the ton of bug reports that exist for different Nextcloud projects and set some priorities. I could not even find any publicly available roadmaps, except for the desktop app, which suggests that there is no clear common plan on where things are going and teams might be working in silos.

Nextcloud marketing team keeps introducing some gimmicky features like live video confirmation to gain access to folders, and some other useless features that make it seem like Nextcloud has it all, while in reality it has too many bugs to be used for anything serious.

I guess the only way to get actual support on any of these cases is if you are a paying enterprise customer, which makes sense but it is still sad that they can't hire more people to manage the projects and fix such essential features as folder sync. Their sales must be really low. 😢

@AndyScherzinger, please correct me if I am wrong.

I'll set up this project tonight to see how bad the codebase is and how hard cookie this particular case is but I suspect it isn't great. Meanwhile if you need a working folder sync on Android - try Syncthing.

mgutt commented 5 years ago

@Janhouse I hope you are wrong.

I'm using FolderSync (sadly a dead project) by myself, but apps like this (f.e. Syncthing or Synchronize Ultimate) aren't usable for noobs as they do not automatically select camera folders etc. My problem is: I have unlimited cloud storage and it's a nextcloud server. So I need the (working) native nextcloud app or a similar app that supports WebDAV.

Does Syncthing use android backup for it's settings? Maybe I could create all the sync rules for my users and they survive a switch to their next android device. But as the SD card has a random folder number I have a sad feeling about that although it uses the backup function.

AndyScherzinger commented 5 years ago

@AndyScherzinger, please correct me if I am wrong.

Hard to tell since I am a community contributor. Nextcloud as a company likely focuses on providing a good service to its customers so if they don't have an issue with the auto upload then this isn't of a high priority to the dev team (just a guess, nothing ever stated to me in person or else).

I created the UI part for the Auto Upload feature (no ligic, processing etc.) but don't have much time these days for contributing code to the app since my day job is keeping me quite busy these days.

wweich commented 5 years ago

Does Syncthing use android backup for it's settings? Maybe I could create all the sync rules for my users and they survive a switch to their next android device. But as the SD card has a random folder number I have a sad feeling about that although it uses the backup function.

Syncthing can backup / restore it's config to / from /storage/emulated/0/backups/syncthing/. But in most cases you won't be able to write to SD Card, as it currently needs direct access to /storage/... but on modern Android one has to use the file access API to get write access to the SD Card.

Janhouse commented 5 years ago

Oh, sorry @AndyScherzinger, I mistakenly mentioned you because this task is assigned to you. I guess the question was to @tobiasKaminsky. Andy, but if you don't plan working on this, please give it back to Tobias.

mase76 commented 4 years ago

I wonder, the keep-in-sync-function worked as expected in the past? I think about a year ago. Now it is completely broken. This should be the main feature of the app.

Henry78 commented 4 years ago

@mase76 You refer to folder keep in sync, i suppose. In my experience: Files are kept in sync well. Folder sync only lacks detectio and syncing if newly added files.