Silly question, but how can I save user preferences locally? For example, the user selects their language preference so every time the app opens, it is in their chosen language. It's one aspect that does not come up in searches online.
Silly question, but how can I save user preferences locally? For example, the user selects their language preference so every time the app opens, it is in their chosen language. It's one aspect that does not come up in searches online.
Hello Blair,
Please use storage variables with Storage type="local storage" for it: https://devcenter.appery.io/documenta...
Will it persist after the user closes the app? Some of the examples/tutorials show clearing local storage in order to work - eg. https://devcenter.appery.io/building-...
I assume that in order to do this, I'll need to run some Javascript during onload, replacing the invoke service option. But I have no clue where to start writing the javascript for this.
Thanks,
All you seek is here:
https://devcenter.appery.io/documenta...
Add storage variable in Project - Storage and Models
Add input field in app UI,
Add button to UI, this saves the input field (have this button when click add mapping to local storage)
If you want to display the saved field in a input or retrieve anywhere else add event on load run javascript Apperyio('name_of_input_or_label').val(localStorage.getItem('name_of_local_storage_field'));
And yes local storage saved even after closing App. This data is only deleted if the user deletes or removes the app entirely.
Hope this helps.
Thanks Carlos!!
you rock!!!