I tried to use localStorage.setItem / getItem and on the web preview it’s working and the data is persistent and I can see the values in the dev console.
When testing on Android in the preview app I get a RefernceError when using localStorage
I just want to locally store a Score value on the client.
I tested the AppGyver hosted user management and noticed it remembers the username after closing and opening an app. I don’t need to know where but what storage mechanism does that use?
I don’t want to use the hosted user management, so is there another way to persist a key/value pair on the client?
Or is there a unique device id available that I can use to send it to a remote server?
I added a test Javascript with this code to a button click:
var n = -1;
try {
n = localStorage.getItem('test');
alert('n='+n)
} catch(e) {
alert(e);
}
return { result: 'n=' + n };
On Android preview app 2.4.24 I get this error alert
On Appgyver Legend 1.9.22 a similar alert: