localStorage empty/null on mobile app

0
I need to read entity values in custom .js file that's used in custom widget. I tried to achieve this by setting the value to  localStorage  in _updateRendering function of the .js file generated for widget. Because contextObject in this file has the entity information. and then reading this value in custom .js file using localStorage.getItem() method. Below is the sample code _updateRendering: function (callback) {             logger.debug(this.id + "._updateRendering");             domConstruct.destroy(this.iframeNode);             this.iframeNode = null;             this._iframeNodeCreate();             if (this._contextObj && this._contextObj.get("ticket"))  {                 localStorage.setItem('ticket',this._contextObj.get("ticket"));                 var viewer = require.toUrl("Viewer/lib/web/viewer.html");                 domAttr.set(this.iframeNode, "src", viewer);             }             // Important to clear all validations!             //this._clearValidations();             // The callback, coming from update, needs to be executed, to let the page know it finished rendering             this._executeCallback(callback, "_updateRendering");         }, localStorage is working fine if I view as Hybrid Phone App Online but its not working in mobile. localStorage is empty on mobile. Any help on how to achieve my requirement is much appreciated
asked
0 answers