Thanks, will try to test it.
How about eclipse ?
It should be same:) just attach JAR files from SDKās
done.
- pack firebase into one jar file,
proj.android/libs/google-firebase.jar
- set app_id & api_key with c++ code,
#if defined(__ANDROID__)
::firebase::AppOptions options;
options.set_app_id("your_app_id");
options.set_api_key("your_api_key");
app = ::firebase::App::Create(options, JniHelper::getEnv(), JniHelper::GetActivity());
#else
app = ::firebase::App::Create(::firebase::AppOptions());
#endif // defined(__ANDROID__)
because I donāt know the correct folder path for google-services.json with eclipse:
E/firebase(28055): Failed to read Firebase options from the app's resources. You'll need to either at least set AppOptions::app_id and AppOption::api_key or include google-services.json your app's resources.
repo https://github.com/yinjimmy/firebase
UPDATE: only got first_open
and session_start
events on android platform, something wrong.
Hi, someone managed to run Firebase C++ sdk on Android?
Hi, yes this one was finished - just check my previously posted git repository.
Hi, thanks, I downloaded your repository and run with ācocos run -p android --android-studioā It deploys but crashes while running. I replaced com.estoty.firebase and google-services.json to my settings and it crashes anyway : ( logcat does not give any crashlog. In my other own test project I statically linked the sdk like you did and also statically linked google play services c++ sdk. I used cocos function JniHelper::getActivity(). It keeps crashing with
pid: 31921, tid: 31981, name: GLThread 11544 >>> com.Lukusoft.FirebaseTest <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Stack frame I/DEBUG ( 193): #00 pc 0003be24 /system/lib/libc.so (tgkill+12)
Stack frame I/DEBUG ( 193): #01 pc 00016985 /system/lib/libc.so (pthread_kill+52)
Stack frame I/DEBUG ( 193): #02 pc 00017597 /system/lib/libc.so (raise+10)
Stack frame I/DEBUG ( 193): #03 pc 00013d3d /system/lib/libc.so (__libc_android_abort+36)
Stack frame I/DEBUG ( 193): #04 pc 000124ec /system/lib/libc.so (abort+4)
Stack frame I/DEBUG ( 193): #05 pc 0040ea59 /data/app/com.Lukusoft.FirebaseTest-1/lib/arm/libMyGame.so
Stack frame I/DEBUG ( 193): #06 pc 0040f013 /data/app/com.Lukusoft.FirebaseTest-1/lib/arm/libMyGame.so (firebase::App::Create(firebase::AppOptions const&, char const*, _JNIEnv*, _jobject*)+258)
I am getting crazy
That strange, maybe latest changes not public, can you check if you see latest commit with changes to few files, it was merged by other user
Hi Guys,
Iāve a similar problem when integrating Firebase on a c++ project, same native crash reported by pebulusek, have you been able to fix it?
Iām going crazy too!
Thank you.
Hi, there is now much easier implementation in SDKBOX also google published they official example for cocos2d-x. Have a look on this examples;)
SDKBox supports firebase analytics now. easy way:
install sdkbox cli
python -c "import urllib; s = urllib.urlopen('https://raw.githubusercontent.com/sdkbox-doc/en/master/install/install.py').read(); exec s"
install plugin
sdkbox import firebase
My problem was not about cocos2d but with a c++ project using Firebase directly.
Finally today Iāve solved the problem, I was linking the wrong libraries (probably a little different architecture) from the Firebase SDK.
Thanks anyway for the help.
Iām not sure if this has been talked about here ā¦ but the Firebase people have a page on how to integrate Firebase/AdMob with Cocos2d-x:
https://firebase.google.com/docs/admob/cpp/cocos2d-x
It isnāt as well documented as I would like but I got AdMob working in my app.