guanlisheng wrote: Sat Dec 23, 2023 11:24 am
hi @adamchap , did you try android + Synology Drive directly?
Ok - experiment(s) completed. Here's what's what for me.
Device: Android 13, with Syncthing Fork as the Syncthing client installed on it
Laptop: Windows 11, running Synctrayzor (to help with the complexity that is a first time Syncthing setup)
Other setup: Synology DSM 220+ NAS, running Syncthing server
Experiment 1: Use MMex on Android to sync directly with Synology server
- Easy to setup. But disadvantage - if you have no Wifi/cell/network access you can't open your money file (this has been handy for me to open offline historically while travelling, or even during a work commute - use that 1h on the train to update finances, but network access is flaky at best, so offline and sync later is key for me
- Can access Synology directly - AS LONG AS you have something like Synology's DS File app also installed. Use the filebrowser in MMex to choose your NAS via DSFile and then just go find your file on your NAS and open it
- Editing, then hitting Synchronize button to save back to the NAS was hit and miss. Sometimes a cannot sync - conflict, both files have been modified error occurred (though no conflict was present in actuality); sometimes it reported success but the file was NOT updated on the NAS.
Experiment 2: Use Syncthing so that the MMex database file on the NAS is sync'd to and from the phone, as well as to and from a laptop - to allow offline editing no matter the device I'm using
- Get familiar with Syncthing, it's a thing of beauty but complexity
- 1 set up 2 jobs in Syncthing: (1) "MMex to Phone" and (2) "MMex to Laptop"
Job 1 setup: Sync everything in my MMex NAS folder, to a new folder on the phone, which was in the main storage folder, called MMex. No versioning in Syncthing; sync scan interval 0 seconds, ignore permissions, send & receive
When using the phone, you have to open MMex app, then you MUST choose "Open Database -> Other " and open the file on your phone. Make your edits and when complete, hit "Synchronize" in the MMex menus. Then quit the app. Syncthing will then do it's thing and sync back to the NAS.
Job 2 setup: As above but doing the same on to my laptop, opening the MMex database file in MMex from a local laptop drive that Syncthing has sync'd the NAS file to. Edit away, when done, Syncthing will sync back to the NAS. (This is all unrelated to the main topic here, but gives context and should help guide others).
Obviously - DO NOT RUN both MMex versions at once else sync conflicts will arise (but at least Synctrayzor on the laptop can help resolve those).
The key on the phone is remembering to Open and Sync from within MMex else you get conflicts - and giving Syncthing a few seconds to sync stuff around the network before leaping on to the other device to carry on editing (I usually give it 10 seconds or so - but moving from 1 device to another so quickly is I think a pretty niche case, more something I was doing during testing).
This is exactly the same procedure I'd always used on MMex on Android from the previous builds and it's just a simple habit to do when using the app. It is NOT POSSIBLE to use Syncthing to pull the database file from android/data/com.moneymanageex/files/databases as the modern Android file browser that Syncthing Android uses won't let you access those files due to Android restrictions - this is why a Synchronize 'back' to the main database file in the separate MMex folder I created is key.
I do hope this helps people if they're using Syncthing and/or any brand of NAS or storage with it. When set up, it's quick, easy to deal with, pretty much invisible and reliable. And should support multiple laptop / device syncs if you follow the simple rules.