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.
source share