Page 1 of 1

Account Session Problem  

PostPosted: Mon 02 Apr 2012 10:29
by matthewx
Hi, all:

I am using Union to develop a multi-users IOS application. I am facing a problem of losing account login session.

in Reactor:
I have the AccountManager.login("username","password");

Then it works fine, but after minimize the application, or the screen auto-locked, the username session will be lost. In the Union Admin, it would only show the connection but no account name appears.

I will appreciate if any of you can provide some ideas or solutions. Thanks.


Regards,
Matthew

Re: Account Session Problem

PostPosted: Wed 11 Apr 2012 17:39
by colin
hi matthew,
reactor has an auto reconnect feature you can use to reestablish the connection. see ConnectionMonitor's setAutoReconnectFrequency() method:

http://www.unionplatform.com/docs/react ... Frequency()

in your situation, you should listen for the ReactorEvent.READY event. the first time it occurs, display a login dialog. if login succeeds, store the user's name and password in memory (i.e., in a variable). the second time the ReactorEvent.READY event occurs, perform the login automatically using the stored user name and password.

good luck with your application. let us know when it launches!

colin

Re: Account Session Problem

PostPosted: Thu 12 Apr 2012 11:06
by matthewx
Thank you very much Colin !