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) }
Scene.cpp
void HelloWorld::menuCloseCallback(CCObject* pSender)
{
OpenFeintAndroid::openLeaderBoards();
}
OpenFeintAndroid.cpp
static void OpenFeintAndroid::openLeaderBoards()
{
JniMethodInfo methodInfo;
if ( JniHelper::getStaticMethodInfo( methodInfo,
“nurogames/app/MyFeint”,
“openLeaderBoards”,
“()V”))
{
methodInfo.env~~>CallStaticVoidMethod;
methodInfo.env~~>DeleteLocalRef( methodInfo.classID);
}
}
MyOpenFeint.java
public static void openLeaderBoards() {
System.out.println(“Opening Dashboard”);
Dashboard.openLeaderboards();
}
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
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:
JniHelper::getStaticMethodInfo(
kJniMethodInfo,
“my/app/MyOpenFeint”,
“openLeaderBoard”,
“(Ljava/lang/String;)V”)