Skip to content

android - locally generated files in favourite folders not synced #2395

Description

@cast-away

Actual behaviour

  • files (and folders) locally copied into a favourite folder by apps other than the nextcloud client are not detected by the sync client and thus not uploaded onto the server

Expected behaviour

  • locally copied files onto favourite folders should be synced

Steps to reproduce

  1. Mark a folder as favorite through the Android client e.g. files/test/
  2. Locate the folder in the phone local storage, e.g. storage/emulated/0/Android/media/com.nextcloud.client/nextcloud/user@server/files/test/
  3. Copy a new file (e.g. newfile.txt) via another app (e.g. file browser) into the folder in point 2
  4. With the nextcloud Android client, sync the folder previously marked as favourite. newfile.txt does not show up.

Environment data

Android version: 7.0

Device model: Motorola G4 Plus

Stock or customized system: stock

Nextcloud app version: 3.03

Nextcloud server version: 13

Activity

  1. ardevd commented on Apr 3, 2018

    @ardevd
    Collaborator

    This behaviour is not supported by the server application so I'd assume its not supported by the Android app either though perhaps @mario or @tobiasKaminsky can confirm?

  2. mario commented on Apr 3, 2018

    @mario
    Contributor

    This has nothing to do with the server. We currently do NOT sync favorite stuff at all, but instead, you mark the file as "Keep available offline" and then it's synced. It does not support the folder mechanism, and it is indeed our goal to move to favorites-based syncing, including folders support.

  3. AndyScherzinger commented on Apr 3, 2018

    @AndyScherzinger
    Member

    @mario @ardevd I think the described request here is different and will imho never be supported since in my personal opinion this is against Android principal.

    From what I understood the request is:
    Locally copying files within the Nextcloud app's installation/data folder should be synced to the server, like the desktop client does. While this is fine for desktop where the client is a file browser Integration the Android client is an app with a protected data folder and nobody except the app itself should write to that storage.

    Just my two cents.

    This might get better when we get to the point of having the time to implement a write document-provider.

  4. ardevd commented on Apr 3, 2018

    @ardevd
    Collaborator

    Yep, that's my understanding as well. It doesn't really make sense to support direct file system manipulations in my opinion, though I do see how some users would prefer to have that ability.

  5. cast-away commented on Apr 3, 2018

    @cast-away
    Author

    I think I see your point, but isn't this exactly what the folders in auto upload do? In that instance it is not just the android app being able to write there as the pictures are generated by another app?
    I might be misunderstanding how this should work though...

  6. AndyScherzinger commented on Apr 3, 2018

    @AndyScherzinger
    Member

    @cast-away yes and no... The auto upload, especially when expert mode is turned on can watch on any folder on the device and upload new/changed files. So if you need that kind of feature it is best to use the auto upload in expert mode with custom folders (for any kind of file type). As for the storage path of the app itself this shouldn't be done simply since Android considers this a protected space where also the write permissions get less and less with each Android OS release.
    Having said this it is also not recommended to set up auto upload for a data folder of another app while this might work for a certain time it might fail in the future with any new Android OS release.

    In short, if you need a folder to be watched on your device, activate the expert mode in the Nextcloud app's settings, go back to auto upload and setup a so called custom folder where you define local and remote folders and when this should get uploaded (wifi-only, charging-only etc.)

  7. AndyScherzinger commented on Apr 4, 2018

    @AndyScherzinger
    Member

    @mario @tobiasKaminsky what's your vote on this? I vote close, since I don't think we'll should implement this since imho it is against Android OS principles.

  8. cast-away commented on Apr 4, 2018

    @cast-away
    Author

    Thanks Andy, I did not know expert mode unlocked the option to set up a custom folder pair. Will give it a go.

  9. cast-away commented on Apr 6, 2018

    @cast-away
    Author

    Testing done, the auto upload does not quite work as a fully synchronised folder:

    1. existing files within the folder are not uploaded. I believe this is the same for existing pictures and the bug has been already reported.
    2. any folders and their content within the folder are not synchronized either
  10. stale commented on May 10, 2019

    @stale

    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!

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions