[SOLVED] Account Session Problem

All Union Platform questions, comments, feature requests, and bug reports.

Account Session Problem  

Postby matthewx » Mon 02 Apr 2012 10:29

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
matthewx
 
Posts: 3
Joined: Fri 20 Jan 2012 16:10

Re: Account Session Problem

Postby colin » Wed 11 Apr 2012 17:39

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
colin
 
Posts: 226
Joined: Mon 17 Oct 2011 18:47

Re: Account Session Problem

Postby matthewx » Thu 12 Apr 2012 11:06

Thank you very much Colin !
matthewx
 
Posts: 3
Joined: Fri 20 Jan 2012 16:10


Return to Union Platform

Online

Users browsing this forum: No registered users and 1 guest