When 'syncronizing' a folder in the nextCloud app, actually changes from the remote server become propagated on the mobile device. However changes on the mobile device aren't uploaded back to the remote server.
How the nextCloud app should behave:
@przybylski @tobiasKaminsky can you take a look at this issue? I thought we already this (or have a branch for this) and also I thought we do this for files (but maybe not for folders yet).
As far as I know there is no real 2 way sync yet.
I started to implement that any folder can be instant uploaded to server, but that is still an enhanced one way sync...
The current situation is this: If you change a file in the phone, you have to open the Nextcloud app, go to the directory where the updated file resides, and drag down with your finger to force a refresh in that directory. Only then your changed file is uploaded to the server and appear on your other devices.
@mabkenar Does this also happen, when you mark the file as a favorite?
Yes. As far as I can tell, making the file favorite (or recently, "Set as available offline") has no effect.
@tobiasKaminsky is this a bug or a works as designed and needs an improvement?
@mabkenar do you have enabled sync in android -> settings -> accounts -> nextcloud?
Only then the sync is working, AFAIR
Oh I see. I never touched the sync setting after I added my Nextcloud account, and now I see that sync was disabled by default (This is strange. Is this a design decision?).
Now with sync enabled, when I change a file on the server, it only appears in Android if the file is "Set as available offline". For non-"Set as available offline" files, no sync happens.
For the reverse situation: only changes made to "Set as available offline" files are propagated back to the server. All other files remain in the local device until a change in the server causes a conflict.
The situation for non-available-as-offline files that are changed from the server is problematic because while an older version of the files is downloaded to the client (say from 1 day ago), there is still a green tick mark next to the file that implies this file is up-to-date, and the client even says "last changed 10 minutes ago" (but this refers to the change in the server that has not been synced to the client). The file is never updated unless a manual "Synchronize" is issued from the client.
Oh before I confuse anyone, I am using Nextcloud provided by F-Droid, and I don't have Google's non-free stuff installed on my device. Could this make any difference?
As a potential new user this is not very clear to me. Could someone from the organization clarify this? Is this feature (2-way-sync) working/planned/workaround? possibly point us to the docs?
@mabkenar f-droid version with any Google service shouldn't be an issue
@LeonardoGentile at the moment the status would be "planned", thus the discussion/issue
@AndyScherzinger any update or timeline for this?
Hi @LeonardoGentile as stated by https://github.com/nextcloud/android/issues/19#issuecomment-225988921 we don't really have a two way sync at the moment. We are working on the first step towards folder sync #285 -> #358. The two way sync is basically the last step planned to be added to that new implementation. A timeline is hard to tell since at the moment all people actively working on the app a community contributors. Since @tobiasKaminsky is aiming at having two way sync this feature has a high priority, not sure if he could name any timeline from his point of view. So for now we only have the road map outlined in #285.
On a file level "Set as available offline" should do the trick at the moment, so you should be able to activate this on a file basis but you can't do it on a (arbitrary) folder level.
Is this the right issue if I just want my phone's camera folder to be synchronized with a folder on Nextcloud, including deletions?
Yup ;)
!remind me in 6 years
What's the state on this? Can someone clarify what does and does not work - e.g. if I mark a folder as synced, will files available in that folder be synced if I make local changes?
As I tested on my phone, with client version 3.8.1, 2-way-sync has only been partially implemented.
Here is the result:
Remove file in the cloud: Local file will automatically disappear.
Add file locally: The file will not be uploaded to cloud even pressing sync in android app, except when there's already a not synced file with same name and path in the cloud, in which case the local file will override the cloud file after pressing sync.
The only way to upload a new file to cloud in android app is to press "Upload files" and select the file manually.
Remove file locally: The file will remain in the cloud, and no longer be synced in android app.
Rename file: Renaming is treated to be removing old file and adding new file.
So, renaming in the cloud will make local file disappear and new file not synced. Press sync will make the file sync and local file with new name appear.
However, renaming local file will only make cloud file not synced. Thus, pressing sync will only download file with old name and make the old file and new file both exist in local file system, which is not acceptable.
The good news is that: Press sync and modification to file content will be propagated to the other side.
Content conflict will trigger conflict resolution as expected, which let the user choose to keep either or both files.
Here is what has been done and what need to to:
Currently the most important case as I see, propagation of changes to local file content, has been implemented, though it need to be triggered manually.
Hope to see android client work the same way as desktop client.
Most helpful comment
As I tested on my phone, with client version 3.8.1, 2-way-sync has only been partially implemented.
Here is the result:
Remove file in the cloud: Local file will automatically disappear.
Add file locally: The file will not be uploaded to cloud even pressing sync in android app, except when there's already a not synced file with same name and path in the cloud, in which case the local file will override the cloud file after pressing sync.
The only way to upload a new file to cloud in android app is to press "Upload files" and select the file manually.
Remove file locally: The file will remain in the cloud, and no longer be synced in android app.
Rename file: Renaming is treated to be removing old file and adding new file.
So, renaming in the cloud will make local file disappear and new file not synced. Press sync will make the file sync and local file with new name appear.
However, renaming local file will only make cloud file not synced. Thus, pressing sync will only download file with old name and make the old file and new file both exist in local file system, which is not acceptable.
The good news is that: Press sync and modification to file content will be propagated to the other side.
Content conflict will trigger conflict resolution as expected, which let the user choose to keep either or both files.
Here is what has been done and what need to to:
Currently the most important case as I see, propagation of changes to local file content, has been implemented, though it need to be triggered manually.
Hope to see android client work the same way as desktop client.