Everyone do the OpenFeint

Everyone do the OpenFeint
0.0 0


I am trying to implement OpenFeint, and even though I can login I get this error:

04-18 15:11:21.728: I/ActivityManager(96): Starting activity: Intent { flg=0x10000000 cmp=mygames.app/com.openfeint.api.ui.Dashboard (has extras) }

void HelloWorld::menuCloseCallback(CCObject* pSender)

static void OpenFeintAndroid::openLeaderBoards()

JniMethodInfo methodInfo;
if ( JniHelper::getStaticMethodInfo( methodInfo,
methodInfo.env~~>DeleteLocalRef( methodInfo.classID);

public static void openLeaderBoards() {
System.out.println(“Opening Dashboard”);

As I said the initialization is correct, the login happens, the manifest was modified with the needed activities but no matter where I call that java piece (onCreate, Scene, somewhere else…) the app just miserably crashes. I have the OpenFeint test project in the same workspace and it works like a charm, so it is something c-related :frowning:

Also, secundary question. I have this java method _public static void openLeaderBoard(String idLeaderBoard)_, how should I call it with the JNIHelper? My solution does not work:




There is a tutorial from Simon. You can see it here

He also wrote a post about JNI with cocos2d-x 0.12. It’s here.




The text is not indented, commented, is project-specific and most of it is outdated and incoherent. That is why I am asking.

And the adbucks link is not classy.


Hi, F Es.

AFAIK The only guy that was kind enough to share how to connect to Openfeint using JNI was Simon.

I’m sorry if that information didn’t help you.

Maybe you could try to contact Simon and ask him for help. As cocos2d-x evolves I believe he updates its Openfeint code.




UP to state that my problem is the same as this guy’s: http://stackoverflow.com/questions/9615899/change-activity-with-jni-call-or-using-openfeint-causes-app-crash

My app flow right now is as follows:
Cocos2dxActivity calls OFWrapper
OFWrapper creates OFHandler
cocos2dx starts scene
scene calls OFWrapper
OFWrapper (static) sends message to handler
Funcion gets called dynamically
(app crashes)

and it happens pretty much the same when calling OFWrapper functions from the main Cocos2dxActivity.