Closed psohm closed 5 years ago
why would it be useful? this doesnt make any sense. databases are meant to hold a large and complex amount of data where settings are just basic types (numbers and strings). also accessing a database is a much more expensive operation than accessing SharedPreferences (and accessing that data could happen a lot during an apps' life cycle).
can you please explain why you would want to do this?
Sure I have an application which store config file for one company I'd like to configure now multiple company and also to sync it with a server
Le mer. 13 févr. 2019 à 06:48, Or Dvir notifications@github.com a écrit :
why would it be useful? this doesnt make any sense. databases are meant to hold a large and complex amount of data where settings are just basic types (numbers and strings). also accessing a database is a much more expensive operation than accessing SharedPreferences (and accessing that data could happen a lot during an apps' life cycle).
can you please explain why you would want to do this?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/or-dvir/EasySettings/issues/7#issuecomment-463068475, or mute the thread https://github.com/notifications/unsubscribe-auth/AFnSvLOq3D-dncft9Y71ESDqDl1DLNAQks5vM6cqgaJpZM4a3Qon .
how big of a configuration file? if not too big, you can possibly convert it to json and then store that as a string. it sounds like the "regular" way of storing settings/preferences does not suit your needs, and this library is meant to be as close to the "regular" way as possible.
i think it is a good idea to store in a json file.
how would do you proceed, would you store in shared pref file and then migrate it in json ? or would you directly store in json with a lib ?
i meant store the json as string (which you can save to shared preferences), not a file. i dont know the specifics of your app requirements and how this configuration file is built, but maybe instead of in a file you can save those configurations as a json string and then save that string to shared preferences
It would be useful to store data in a sqlite database Is it possible to integrate external saving ?