I am trying to use the state manager object in my project, but I notice an unexpected behavior.
First of all, this is my code:
In my sessionConnectedHandler, I have this:
stateManager = session.getStateManager();
I have another function that does:
The behavior that I'm experiencing is that the testStateManagerHandler is called when I am adding the event listener to the state manager in the sessionConnectedHandler, before I even get to set the new state.
Any thoughts on this? I appreciate your help.