Google Analytics on low API.

  • olegkarman
    Likes 0

    Problem Description

    Hi! Have a question like this:

    How your Google Analytics plugin works on Android devices with API-15 or API-16? 

    Because when I want to send an event I always get an error : 

    D/CCJavascriptJavaBridge: Failed to find method id of sonar/systems/framework/SonarFrameworkFunctions.SendGAEvent (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;I)V

    And when I try to set screen name I receive: 

    D/IPCThreadState: [DN #5] BR_CLEAR_DEATH_NOTIFICATION_DONE cookie 0x639d5ad8

    and there are no screens or active users on my GA account, but signing in with Google Play Games works great.


  • Sonar Systems admin
    Likes 0

    Are you asking do they or how to make them?


    This reply has been verified.
  • olegkarman
    Likes 0

    I am asking about if it works on earlier devices in general.


    This reply has been verified.
  • Sonar Systems admin
    Likes 0

    should be ok


    This reply has been verified.
  • olegkarman
    Likes 0

    Everything work except sending events. Still receive an error 

    D/CCJavascriptJavaBridge: Failed to find method id of sonar/systems/framework/SonarFrameworkFunctions.SendGAEvent (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;I)V

    but as far as I can see, all other functions like setScreenName, signIn or leaderboard don’t log any errors.


  • Sonar Systems admin
    Likes 0

    What API?

  • olegkarman
    Likes 0

    I tried to run it on device with API-16 and on emulators with API 17,19 and 22.

  • Sonar Systems admin
    Likes 0

    Have you followed our video tutorials?


    This reply has been verified.
  • olegkarman
    Likes 0

    Yes, but I am not working with Eclipse. My project is in Android Studio.

  • Sonar Systems admin
    Likes 0

    Honestly Android Studio support for Cocos is terrible ATM, use Eclipse.

  • olegkarman
    Likes 0

    Ok, I will try, but still this is weird, because other functions work good except event sending.


  • olegkarman
    Likes 0

    I have fixed my problem with Android Studio after I read this: http://www.cocos2d-x.org/wiki/Invoking_Android_Java_methods_from_JavaScript. I just change 

    SendGAEvent(final String category, final String action, final String label, long value)

    to 

    SendGAEvent(final String category, final String action, final String label, int value)

    inside every JAVA- file.

  • Sonar Systems admin
    Likes 0

    Great to hear.


    This reply has been verified.

Login to reply