BijoySingh / Scarlet-Notes

[Discontinued and Unsupported Project] Simple yet powerful rich note taking android application, with a lot of flexibilty of usage
https://play.google.com/store/apps/details?id=com.bijoysingh.quicknote
GNU General Public License v3.0
357 stars 93 forks source link

enable possibility to sync for more/all users #3

Open DJCrashdummy opened 6 years ago

DJCrashdummy commented 6 years ago

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.

BijoySingh commented 6 years ago

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.

smichel17 commented 6 years ago

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.

lokesh-krishna commented 6 years ago

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.

violoncelloCH commented 6 years ago

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

Offerel commented 6 years ago

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?

BijoySingh commented 6 years ago

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
  2. 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.
patschi commented 6 years ago

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

smichel17 commented 6 years ago

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

ghost commented 6 years ago

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?

ImproverOne commented 6 years ago

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.

DJCrashdummy commented 6 years ago

@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...

EternityForest commented 4 years ago

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.