brodeurlv / fastnfitness

FastNFitness Android app: Body, Cardio and Fitness tracking.
https://play.google.com/store/apps/details?id=com.easyfitness
BSD 3-Clause "New" or "Revised" License
271 stars 360 forks source link

Feature Request: Save All data to home folder #115

Open BeatLink opened 4 years ago

BeatLink commented 4 years ago

Rather than have a database stored in the app specific areas of the device, would it be possible to store the app data in the user's home folder? That way the export and import system would no longer be needed and various syncing tools like dropbox, google drive and nextcloud could be used to sync the data. There is already a folder in the users home for fastnfitness for exports, logs and exercise photos. It would reduce the complexity of the code since the import and export systems could be removed.

This would also solve issue #113

brodeurlv commented 4 years ago

Hi Beatlink, I agree with you. I was thinking about this a while ago but this is kind of a big migration as I am using sorting and filtering features from sqlite. If you know by any chance a good textfile-based database I would be interested. Thanks.

Le jeu. 19 mars 2020 à 00:45, BeatLink notifications@github.com a écrit :

Rather than have a database stored in the app specific areas of the device, would it be possible to store the app data in the user's home folder? That way the export and import system would no longer be needed and various syncing tools like dropbox, google drive and nextcloud could be used to sync the data. There is already a folder in the users home for fastnfitness for exports, logs and exercise photos. It would reduce the complexity of the code since the import and export systems could be removed.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/brodeurlv/fastnfitness/issues/115, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD65NDWMLJAUQ7ZPIYXXZODRIFMKDANCNFSM4LO44FFQ .

BeatLink commented 4 years ago

Well a good starting point would be to keep the database as is (i presume SQLite?) and simply change the location to the FastNFitness folder in the user's home folder. That would right away give you syncing and backup options through other apps and it should be easy to implement as a good starting point

cdanne commented 4 years ago

+1 for this one. And I agree this would be a better solution for the requirement to keep a backup. So this would indeed replace #113.

brodeurlv commented 4 years ago

Hi all, thinking about this, depending on how it is done, I think this could be an issue in case of an uninstall (as the database will remain) and on a reinstall (as the old DB will still be used). I understand the need but I don't think this is a good practice to have a fixed home location by default.
A better design would be to give the choice to the user to select where he wants his DB to be stored. With that, it keeps the flexibility for the user, without the location being fixed in the app. And on reinstall, it won't use the "wrong/obsolete" database by default. Any volunteer to propose a pull-request with this design? :-). Thanks.