Page 1 of 1

Settings service storage

Posted: Sat Feb 13, 2016 10:49 am
by Andrew Peacock

Just a quick one: where are the values for settings services stored (in an Angular app). I can't see them in localstorage, so I guess not there.

Regards,
Andy


Settings service storage

Posted: Mon Feb 15, 2016 8:39 am
by Serhii Kulibaba

Hello Andrew,

They are keeping in the JS file constants.js. And you can read them with method:
Apperyio.Config.get();
More information here:
https://devcenter.appery.io/documenta...


Settings service storage

Posted: Mon Feb 15, 2016 9:53 am
by Andrew Peacock

Hi Sergiy,
Thanks for clarifying. That's what confused me - currently I'm testing this in the standard test more in the browser. However, once the app is compiled to an APK file, if I use Apperyio.Config.add(), does that mean the constants.js file changes on the mobile device?
Regards,
Andy


Settings service storage

Posted: Mon Feb 15, 2016 12:23 pm
by Serhii Kulibaba

No,
Appery.io reads that file when app is loading.
After that you can manipulate with configs (add/remove) as variables in the RAM. Nothing is writting to the file or localStorage.
So after each execution of the app these configs set with default values (from the constants.js)


Settings service storage

Posted: Wed Feb 17, 2016 9:04 am
by Andrew Peacock

Ah, ok, thanks Sergiy. I'll use the AppPreferences cordova plugin instead, as I need to save changes permanently.

Regards,
And