Advanced features of login-assistant

Post here your questions about the Java client / Android API for SFS2X

Moderators: Lapo, Bax

hoanghuybao
Posts: 35
Joined: 22 Aug 2015, 16:20

Advanced features of login-assistant

Postby hoanghuybao » 16 Nov 2015, 17:08

Hi admin,

I see that we can set some extra fields after the credentials have been checked in server side.
Document:http://docs2x.smartfoxserver.com/DevelopmentBasics/login-assistant

Code: Select all

 // Store avatar in session object
            loginData.session.setProperty("avatar", avatarPic)
             
            // Set client as Moderator
            if (isMod)
                loginData.session.setProperty("$permission", DefaultPermissionProfile.MODERATOR);

However, How to client side can get thoes extra fields?

Thanks,
User avatar
Lapo
Site Admin
Posts: 22999
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Advanced features of login-assistant

Postby Lapo » 17 Nov 2015, 15:17

Hi,
the loginData parameter contains a field called clientOutGoingData of type SFSObject.
You can populate it with all the necessary data you want the client to receive in the login response.

Hope it helps
Lapo
--
gotoAndPlay()
...addicted to flash games
hoanghuybao
Posts: 35
Joined: 22 Aug 2015, 16:20

Re: Advanced features of login-assistant

Postby hoanghuybao » 17 Nov 2015, 16:27

Thanks for your help. It is very helpful. :D

Return to “SFS2X Java / Android API”

Who is online

Users browsing this forum: No registered users and 3 guests