hello i m trying to pass a variable that exists inside app.js ev.deviceToken to another window window.js i have tryed to do this with setString - getString , but it doesnt works:
Ti.App.Properties.setString('devicetoken', ev.deviceToken); in app.js Ti.App.Properties.getString('devicetoken'); in my window.jsthe result is null!
Now i am trying to pass it with a fireEvent - addEventListener
Ti.App.fireEvent('MyEventString',{devicetoken:ev.deviceToken}); in app.js Ti.App.addEventListener('MyEventString',function(e){ dtok = e.devicetoken; }); in my window.js now i want to take this dtok and use it in another addEventListener on this window.js Ti.App.addEventListener("app:got.location", function(d) { webViewHome.setUrl( ................. +dtokThe problem is that dtok exists only inside the first addEventListener and i cant take it out of it :/