LocalStorage on Android not working?

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');
} catch(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:
Screenshot_20210110-180931_AG Legend

Hi August, you can persist data with the Set item to storage, Get item from storage and Delete item from storage flow functions (found in Flow Function Market on the logic canvas). That should automatically find the right path to local storage regardless of the platform used.