• When you change app (e.g. go to settings which is also an app) then all variables, including globals, are deleted and new app starts from empty state. Only way to save data beyond that is to use flash.

    You can use kill event to save data when your widget is about to get shut down:

    E.on('kill', () => {
      // save data to flash
    });
    
About

Avatar for malaire @malaire started