Does Phonegap get localstorage values โ€‹โ€‹from Java code?

I saved the data on the client side via telephone using localstorage , and now I would like to access this saved data using java code.

Is it possible? How can i do this?

Thanks.

+6
source share
1 answer

Why donโ€™t you create your own plugin that saves the values โ€‹โ€‹in the general settings of Android and call them every time you add / delete objects in local storage.

So, in javascript, you do not directly call the localstorage function, but a wrapper that 1) manages the local storage, and then 2) calls the plugin to save it in the general settings.

Of course, this includes a double copy of each object, so you will also have to handle this, but if changes to localstorage always start with javascript, this should not be a problem.

+3
source

Source: https://habr.com/ru/post/914442/


All Articles