SDKBOX 2.3.15 Release - Firebase

SDKBOX 2.3.15 Release - Firebase
0.0 0

#1

We added Firebase Analytics for 2.3.15 release.

Check out our sample for how to use them.

2.3.15 Release Notes

Highlights

  • Support NDK r14b c++_static
  • Support Firebase Analytics module
  • Review support amazon platform
  • IAP add user ID and purchase token for the purcase calblack issue
  • SDKBOX Play disable cloud save as default
  • Google Play Services upgrade to 11.0.0
  • gpg cpp sdk upgrade to 2.3

Bugfix

  • Fix IAP receipt and receiptCipheredPayload not working for non-consumable on android issue
  • Fix IAP crash in IabHelper.getPurchases issue
  • Fix SDKBOX Play fail to connect to Google Play Services issue issue
  • Fix SDKBOX Play local reference table overflow issue
  • Fix SDKBOX Play removeListener doesn’t work on Android issue
  • Fix fail to patch Cocos2dxActivity.java 3.15.1 issue

Welcome any feedback or issue.

Thank you!


Errors when linking sdkbox libraries with ndk r13b, clang and c++_static stl
#2

Where can I find this release? Can’t find anything on the sdkbox website referring to this version


#3

Thats sounds cool :slight_smile: will check soon Firebase part

Installation Successful :slight_smile:
downloading package sdkbox-firebase_v2.3.15.2.tar.gz
[###################################] 100%
failed to patch file AppDelegate.cpp
Please reference the online documentation to finish the integration:
http://sdkbox-doc.github.io/en/plugins/firebase/v3-cpp/
0:71: execution error: “http://sdkbox-doc.github.io/en/plugins/firebase/v3-cpp/” doesn’t understand the “open location” message. (-1708)


#4

AHA, which cocos version?


#5

3.14.1 - acctually failed to patch file AppDelegate.cpp not big issue - as it is clear what u need to do to make it work there(probably it failed due we have already a lot of code in appdelegate and installed can’t find proper place where to add include/init).

I’m more wondering about this 0:71: execution error: “http://sdkbox-doc.github.io/en/plugins/firebase/v3-cpp/” doesn’t understand the “open location” message

It seems something new - probably browser cant open that url.

One complain I would have regarding bundled google play services - it still have Build tools in gradle 22.0.1 I think everyone already moved after cocos 3.15 to build tools 25.0.0 - so u should change to this one in bundle.


#6

Also I dont see where is debug events? Firebase have debug parameter to see all events live - not sure if u implemented this in your code - can’t find ti so far.

It seems Firebase plugin doesn’t work:( I have all files set, xml added to res/values but no any event showing in dashboard.


#7

Should wait for several hours.

In Firebase c++ SDK? In SDKBox, we provide a native SDK wrapper plugin.
If you want to immediately verify events what are being sent, take a look at

We doc it here.

I reproduce this issue on macOS 10.12.5, but chrome can open the url. It seems an issue (1 2 3) on the latest macOS.

##Update:
Got some tester data
Android:

iOS:


#8

I will try once more - to see what wrong goes here, like Firebase have streamview where u can see realtime events. I was playing with it integrating firebase myself - now I used skdbox with same app and no events comming - there should not be delay in streamview.

So I’m assuming some lib missing or something hapened with config xml file. The only thing I see in console:

07-09 21:27:12.346 11186-11186/? I/FA: App measurement is starting up, version: 9683
07-09 21:27:12.346 11186-11186/? I/FA: To enable debug logging run: adb shell setprop log.tag.FA VERBOSE
07-09 21:27:12.363 11186-11186/? I/FA: To enable faster debug mode event logging run:

This looks strange:

07-10 13:58:17.497 18251-18275/? E/Firebase: setScreenName is not support on android
07-10 13:58:17.499 18251-18275/? D/cocos2d: android SDK version:24
07-10 13:58:17.499 18251-18333/? E/FA: AppMeasurementService not registered/enabled
07-10 13:58:17.499 18251-18333/? E/FA: Uploading is not possible. App measurement disabled


#9

I’m not sure but after multiple tries I’m assuming you didn’t tested your plugin with gradle setup?

In git i see only example for ant and not gradle/android-studio.

After experiments:

  1. Removed from cocos2d-x build.gradle:

compile project(’:gps’)

  1. Added into proj.adnroid-studio: build gradle:

    dependencies {
    classpath ‘com.android.tools.build:gradle:2.3.3’

         classpath 'com.google.gms:google-services:3.0.0'
         // NOTE: Do not place your application dependencies here; they belong
         // in the individual module build.gradle files
     }
    
  2. Added into app build.gradle:

apply plugin: ‘com.google.gms.google-services’

  1. deleted from libs folder:
    sdkbox-firebase.jar

  2. deleted from res/values/ googelplayservices.xml and added google-services.json to app folder

I successfully compiled project and immediately received debug event.

So I don’t se reason to use conversion from json to xml as it is done automaticly if u attaching google play services thru gradle, your setup is incorrect for gradle…


Integration of Firebase Crashlytics in Cocos2d-X engine
#10
App measurement disabled?

can you add follow to your manifest

<service android:name="com.google.android.gms.measurement.AppMeasurementService"
            android:enabled="true"
            android:exported="false"/>
        <receiver android:name="com.google.android.gms.measurement.AppMeasurementReceiver"
            android:enabled="true">
            <intent-filter>
                <action android:name="com.google.android.gms.measurement.UPLOAD" />
            </intent-filter>
        </receiver>

#11

yep,

this is a way,

use the solution, you replace firebase lib sdkbox provide with firebase gradle lib. (firebase lib in sdkbox is come from firebase gradle, they are same)


#12

I have added this alreaady - unpacked apk to check if it is still there… it there but doesnt work - could be some conflcit with admob/facebook/google analytics… who knows :slight_smile:


#13

I test on -x 3.15.1 android studio, works fine. I’ll try 3.14.1


#14

tried 3.14.1, works fine.

  1. cocos new -l cpp cppTest
  2. replace applicationId with com.sdkbox.test.app.firebase in app/build.gradle
  3. cp googleservices.xml from sdkbox-sample-firebase cpp to ./proj.android-studio/app/res/values/googleservices.xml
  4. modify HelloWorldScene.cpp to invoke firebase logevent function
  5. cocos run -p android --android-studio

#15

so you getting events in debug mode? Now trying myself hello world 3.15.1


#16

yep

i use this to check the log event:

``
adb shell setprop log.tag.FA VERBOSE
adb shell setprop log.tag.FA-SVC VERBOSE
adb logcat -v time -s FA FA-SVC


#17

to be sure you see your events in Firebase console?


#18

as firebase official document, https://firebase.google.com/docs/analytics/android/events#view_events_in_the_android_studio_debug_log

use this can check event immediately.

in firebase console, must wait hours.


#19

actually no.

To enable Analytics Debug mode on an Android device, execute the following commands:

adb shell setprop debug.firebase.analytics.app <package_name>

This behavior persists until you explicitly disable Debug mode by executing the following command:

adb shell setprop debug.firebase.analytics.app .none.

If u running that first command:
adb shell setprop debug.firebase.analytics.app <package_name>

you should immediately get debug events in Firebase dashboards in DebugView section (as my attached screenshot), by some reason cocos2d-x bundled firebase not sending events there. If I removing sdkbox-firabase and using original everything works imidiatly - Im receiving events in DebugView.

I just installed Hello World 3.15.1 imported firebase and still same issue. There is my log:

07-10 18:02:33.995 V/FA      ( 1699): App package, google app id: com.mygame.test, 1:4534534535:android:5345353533555fa
07-10 18:02:33.996 I/FA      ( 1699): Faster debug mode event logging enabled. To disable, run:
07-10 18:02:33.996 I/FA      ( 1699):   adb shell setprop debug.firebase.analytics.app .none.
07-10 18:02:33.996 D/FA      ( 1699): Debug-level message logging enabled
07-10 18:02:34.001 V/FA      ( 1699): Cancelling job. JobID: 816241085
07-10 18:02:34.002 V/FA      ( 1699): Registered activity lifecycle callback
07-10 18:02:34.005 V/FA      ( 1699): Persisting first open: 1499698953987
07-10 18:02:34.012 E/FA      ( 1699): AppMeasurementService not registered/enabled
07-10 18:02:34.012 E/FA      ( 1699): Uploading is not possible. App measurement disabled
07-10 18:02:34.005 V/FA      ( 1699): Persisting first open: 1499698953987
07-10 18:02:34.012 E/FA      ( 1699): AppMeasurementService not registered/enabled
07-10 18:02:34.012 E/FA      ( 1699): Uploading is not possible. App measurement disabled
07-10 18:02:34.726 D/FA-SVC  ( 5973): Got package added intent: com.mygame.test
07-10 18:02:34.012 E/FA      ( 1699): AppMeasurementService not registered/enabled
07-10 18:02:34.012 E/FA      ( 1699): Uploading is not possible. App measurement disabled
07-10 18:02:34.726 D/FA-SVC  ( 5973): Got package added intent: com.mygame.test
07-10 18:02:37.074 V/FA      ( 1577): Inactivity, disconnecting from the service
07-10 18:02:34.012 E/FA      ( 1699): Uploading is not possible. App measurement disabled
07-10 18:02:34.726 D/FA-SVC  ( 5973): Got package added intent: com.mygame.test

As this log states - firebase can’t upload data by some reason and it’s seems inside sdkbox jar.


#20

is there same different from my steps?

  1. cocos new -l cpp cppTest
  2. replace applicationId with com.sdkbox.test.app.firebase in app/build.gradle
  3. cp googleservices.xml from sdkbox-sample-firebase cpp to ./proj.android-studio/app/res/values/googleservices.xml
  4. modify HelloWorldScene.cpp to invoke firebase logevent function
  5. cocos run -p android --android-studio