Notice: The Monaca & Onsen UI Community Forum is shutting down.
For Onsen UI bug reports, feature requests and questions, please use the Onsen UI GitHub issues page. For help with Monaca, please contact Monaca Support Team.
Thank you to all our community for your contributions to the forum. We look forward to hearing from you in the new communication channels.
Maintaining State When Placed In Background.
-
Can you tell me how I can maintain state or the best way to do so when I place the app in the background or if there is a plugin to do so.
I have tried a couple of things but if shut down and reboot or the detail is lost.
Thanks in advance.
-
@lammie71, use localStorage.
https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage
-
Hi, thanks for the reply.
I have toyed with local storage but what is the maximum size in MB I can store? I would also need to store some HTML code that is built on the fly when the app is used.
-
@lammie71, you could have googled this info:
https://stackoverflow.com/questions/2989284/what-is-the-max-size-of-localstorage-values