cocos2d-js with smartfoxserver in native app ios and android

Post here your questions about the HTML5 / JavaScript for SFS2X

Moderators: Lapo, Bax

huyhungkun
Posts: 1
Joined: 04 Jan 2014, 11:09

cocos2d-js with smartfoxserver in native app ios and android

Postby huyhungkun » 21 Feb 2016, 14:49

How to use cocos2d-js with smartfoxserver in native app ios and android. I tried connect (by javascript API) on web and success, but when connect in my android device (build apk file by cocos2d-js), it failed, status is "Connection failed: It the server running at all?". Do any one provide some solution for me, thank all.
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: cocos2d-js with smartfoxserver in native app ios and and

Postby Lapo » 22 Feb 2016, 08:54

Hi,
are you testing locally (e.g. localhost / 127.0.0.1)?
If so keep in mind that the localhost address in Android does not correspond to 127.0.0.1 but 10.0.2.2

Read here:
http://stackoverflow.com/questions/5806 ... -in-eclips

thanks
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “SFS2X HTML5 / JavaScript API”

Who is online

Users browsing this forum: No registered users and 22 guests