Is there any one use cocos2d-x + smartfox Server for Android MMORPG Game

SmartFoxServer support jar package for andriod , but there is no support on C++ , can I use JNI connect cocos2d-x and SmartFoxServer.
Is there any friend do same thing?

Chuan Peng wrote:

SmartFoxServer support jar package for andriod , but there is no support on C*+ , can I use JNI connect cocos2d-x and SmartFoxServer.
Is there any friend do same thing?
i’m developing cocos2d-x* smartfoxserver 2x
using jni
i success connection, room create, room join and data exchange

@byeongseok yu
Could you share your jni codes for smartfoxserver2x ? I think lots of developers need it too.

It was weekend,my code is in company therefore it was hard to post jni code immediately.
So when I arrive to company, I supposed to post jni code as soon as I can.

You should refer about glthread , you must do the right things on thread-safety.

native to java
using message handler

java to native
using runOnGLThread(if you extends Cocos2dxActivity , you could use runOnGLThread
This has same case queue event in java)
:slight_smile:

James Chen wrote:

@byeongseok yu
Could you share your jni codes for smartfoxserver2x ? I think lots of developers need it too.

mark

@byeongseok yu

Thank you, it will be better if you attach the source files since the source format you paste is a little chaotic.

James Chen wrote:

@byeongseok yu
>
Thank you, it will be better if you attach the source files since the source format you paste is a little chaotic.

ok. i write again after summarizing

ok. i write again after summarizing

Hi byeongseok yu,
So how about the progress of smartfox support for cocos2d-x?

This is solotion , and my game is online…

http://blog.csdn.net/juckerpp/article/details/8124929#comments

Hi Chuan Peng,
I can’t find the source of the page.
Could you share the sources?

Chuan Peng wrote:

This is solotion , and my game is online…
>
http://blog.csdn.net/juckerpp/article/details/8124929#comments

James Chen wrote:

> ok. i write again after summarizing
>
Hi byeongseok yu,
So how about the progress of smartfox support for cocos2d-x?

jni was about 40 percent complete.
so, smartfoxserver2x c++ api beta version published.

http://www.smartfoxserver.com/download/sfs2x#p=updates

mark