Scarlet-Notes icon indicating copy to clipboard operation
Scarlet-Notes copied to clipboard

enable possibility to sync for more/all users

Open DJCrashdummy opened this issue 6 years ago • 12 comments

according to #2 i would suggest to rather support a more generic sync-method like WebDAV, so a variety of services and servers is supported at one swoop (and not just one closed service with proprietary software and protocol)!

BUT maybe the easiest would be to just provide a function to choose a folder where the notes will be saved, so the app itself stays truly offline and if desired everybody can sync his notes with whatever software and service he wants to.

DJCrashdummy avatar Dec 03 '17 12:12 DJCrashdummy

Yeah, Sync is on my mind, I have been thinking about it. The problem with sync is the not backing up but loading back down. If we sync, it will have to be real time, unless it is very clear that it is not an expectation.

Ideally I would want to do something like Firebase, but since it is paid, and the services will break for FDroid which is using this app and building it on their end. But yes, I think simply auto-backup to external folder might be the first step.

BijoySingh avatar Dec 09 '17 18:12 BijoySingh

I've been using a todo.txt app on my phone and syncing via nextcloud forever with few issues. I'm not sure how that interacts with newly created files (are they synced automatically?), though.

smichel17 avatar Dec 13 '17 01:12 smichel17

But yes, I think simply auto-backup to external folder might be the first step.

Maybe simply allow setting a directory where the notes are stored or are read from? This might necessitate displaying folders too when users begin nesting notes but then everyone can just sync the folder with a service of their choice and you'd need to do nothing on your end.

lokesh-krishna avatar Dec 20 '17 06:12 lokesh-krishna

+1 for WebDav sync (useful for Nextcloud/Owncloud Notes)

violoncelloCH avatar Dec 25 '17 13:12 violoncelloCH

Currently I'm using Synchronize Ultimate, to sync Android to Folders to a Raspberry pi via WebDAV. So all what i need to know is the folder path on Android, where the notes are stored. Can you please tell us that folder?

Offerel avatar Dec 25 '17 16:12 Offerel

Ok, so I have though of doing this starting soon. Will be doing this in two ways.

  1. Auto Backup:
  • The notes will be exported automatically to the backup folder every day. (This is not sync, as it will not read from there)
  • [Low/No Pri] Maybe an extension would be to allow reading, but it will be impossibly difficult to handle edge cases
  1. Firebase Cloud Sync:
  • Not Applicable for FDroid installs, only Google Play Installs
  • The user (optionally) signs in with Google, and then they will be able to sync the notes accross the devices live, similar to what happens in Keep/my other app Clipo.
  • This has to be done carefully, as none of this code will have to be in the master branch, to safeguard future FDroid builds.

BijoySingh avatar Dec 28 '17 10:12 BijoySingh

As previously suggested in #2 I'd suggest using CalDAV, a WebDAV extension. Just as an example: The mentioned OpenSource app DAVdroid (which seems to be recommended by Nextcloud itself) is using CalDAV to sync both, Calendar as well as ToDo.

Links for DAVdroid

  • Google Play Store: https://play.google.com/store/apps/details?id=at.bitfire.davdroid
  • Source available at https://gitlab.com/bitfireAT/davdroid

patschi avatar Dec 28 '17 12:12 patschi

You can write to your app's directory on internal storage without requesting file permissions. You get its location with Context.getFilesDir():

https://developer.android.com/reference/android/content/Context.html#getFilesDir()

https://developer.android.com/training/data-storage/files.html#WriteInternalStorage

smichel17 avatar Dec 28 '17 13:12 smichel17

You could leave sync up to the user by exporting in an easily parseable format to a directory on storage, optionally external storage, then the user could use something like Syncthing to sync to the desktop, and possibly we could use another client to edit the notes there?

ghost avatar Jan 31 '18 07:01 ghost

I understand that syncing like keep is good, but the advantage of keep is that they have ios version of the app, so they permit the users freedom. Scarlett note pro is fun, to improve it is necessary to have an ios version or website version to get really flexibility.

ImproverOne avatar Feb 19 '18 10:02 ImproverOne

@BijoySingh why are you thinking so complicated...?

i understand, that a built-in generic sync-service (WebDAV) may exceed the scope of this project... but why not go for the easiest solution, which will also require much less effort to implement: simply use an user-defined folder at the "external" storage as main storage (saving & reading) for the notes instead of the "internal" android-storage and let the sync-software do everything else (including conflict-handling).

everything else are separate topics...

  • not sure if backups are required - much sync-services provide versioning.
  • integrating a sync-service is still possible, if really needed.
  • to think a bit further: maybe a setting to strip down markup and use/sync normal text-files (which can easily be opened and modified everywhere) may be worth to consider...?

DJCrashdummy avatar Apr 03 '18 13:04 DJCrashdummy

SyncThing is such a fantastic system. Just saving to the filesystem and syncing with SyncThing would be enough. Half the point of sync is mostly to the computer, and there's already plenty of markdown editors.

You could just do what Pico does and store metadata in YAML as a header in the .md file.

EternityForest avatar Sep 26 '19 04:09 EternityForest