Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

FlurryAgent wrapper for Unity 3.2+

Discussion in 'Android' started by ZeroStride, May 3, 2011.

  1. ZeroStride

    ZeroStride

    Joined:
    Mar 9, 2011
    Posts:
    34
    View attachment $AndroidFlurryAgent.unitypackage

    Flurry (link) is a solution for analytics tracking on mobile devices.

    This wrapper uses the Android Java classes built in to Unity to operate on the Flurry SDK. The included version of the Flurry Android SDK is 2.1.

    The methods, and arguments of the Unity wrapper all correspond to the same methods on the FlurryAgent Java class.

    Notes
    • Call 'onEndSession' from OnApplicationPause(true) as well as OnApplicationQuit()
    • Call 'onStartSession' from OnApplicationPause(false)
    • Use 'setContinueSessionMillis' to adjust the timeout on starting a new session vs. continuing the existing session. This interacts with OnApplicationPause functionality, since using something like the OpenFeint dashboard, or Google's In-App Billing will cause a call to OnApplicationPause. The default value is 10 seconds. See the Flurry documentation for more information.

    Known Issues
    • I'm not kidding...call onEndSession properly or you will not see your events show up.
    • The 'setGender' method is not implemented because I don't need it and I didn't really want to muck about with pulling the constants out of the Flurry class.
     
  2. handsomePATT

    handsomePATT

    Joined:
    Nov 30, 2010
    Posts:
    574
    thanks! this is awesome.
     
  3. Curious

    Curious

    Joined:
    Nov 19, 2009
    Posts:
    334
    Thank you very much for you contribution buddy :)
     
  4. legion

    legion

    Joined:
    Feb 9, 2011
    Posts:
    174
    Thanks :)
     
  5. handsomePATT

    handsomePATT

    Joined:
    Nov 30, 2010
    Posts:
    574
    Hey so Im getting a JNI unable to find method id error for all of the flurry methods. this is my code

    Code (csharp):
    1. using UnityEngine;
    2. using System.Collections;
    3. using System.IO;
    4.  
    5. public class GUIThings : MonoBehaviour
    6. {
    7.  
    8.     FlurryAgent flurry = new FlurryAgent();
    9.  
    10.     void Start()
    11.     {
    12.         flurry.onPageView();
    13.     }
    14.  
    15.     void OnGUI()
    16.     {
    17.          if (GUI.Button(new Rect(Screen.width - cameraImage.width, Screen.height - cameraImage.height, cameraImage.width, cameraImage.height), cameraImage))
    18.         {
    19.             flurry.logEvent("Uploaded Picture To Facebook");
    20.         }
    21.     }
    22.  
    23.     public void OnApplicationPause(bool pause)
    24.     {
    25.         if (pause == true)
    26.         {
    27.             flurry.onStartSession("MY ID");
    28.             Application.LoadLevel("SplashScreens");
    29.         }
    30.         else
    31.         {
    32.             flurry.onEndSession();
    33.             Application.LoadLevel("SplashScreens");
    34.         }
    35.     }
    36.  
    37.     public void OnApplicationQuit()
    38.     {
    39.         flurry.onEndSession();
    40.     }
    41. }
    I also tried instead of flurry.whatever doing FlurryAgent.Instance.whatever and same thing.
     
  6. ZeroStride

    ZeroStride

    Joined:
    Mar 9, 2011
    Posts:
    34
    Is this in the editor, or on the Android device. As far as I know, the AndroidJNI classes will only bind the Java methods on the Android device. In the editor, you will get that warning.
     
  7. handsomePATT

    handsomePATT

    Joined:
    Nov 30, 2010
    Posts:
    574
    oh ok yeah it was editor. I just wasnt sure how to check if it was working, because on the android it doesnt seem to update my stats.
     
  8. ZeroStride

    ZeroStride

    Joined:
    Mar 9, 2011
    Posts:
    34
    In my experience, it takest about 30 or so minutes to show up on the Flurry site.
     
  9. handsomePATT

    handsomePATT

    Joined:
    Nov 30, 2010
    Posts:
    574
    oh ok. so the code i showed looks right though?
     
  10. ZeroStride

    ZeroStride

    Joined:
    Mar 9, 2011
    Posts:
    34
    Possibly, are you calling onStartSession from anywhere but ApplicationPause? The first launch of your application will not invoke Pause, so you will likely want it in Start() also.

    The reason you want it in Pause is because, if your application is exited and then resumed (via pressing the home button or whatever) than on resume, you will not get a call to Start() again, because Start() already happened during the previous session.
     
  11. handsomePATT

    handsomePATT

    Joined:
    Nov 30, 2010
    Posts:
    574
    no i only call onStartSession from that pause. I will put it in Start() too. Thanks :)
     
  12. eltonbird

    eltonbird

    Joined:
    Mar 9, 2010
    Posts:
    41
    I've just tried to integrate this with my project, and I'm getting a crash with the following in the logcat:-

    FATAL EXCEPTION: Thread 16
    java.lang.ClassNotFoundException: com.flurry.android.FlurryAgent
    ...
    ...
    Caused by: jave.lang.NoClassDefFoundError: com.flurry.android.FlurryAgent..

    Is there some step I'm missing in using the package? I'm not too familiar with Android development as yet...

    Thanks,

    Elton
     
  13. eltonbird

    eltonbird

    Joined:
    Mar 9, 2010
    Posts:
    41
    No one with any idea why this isn't working for me? Is just installing the package all I shoul dneed to do, or is there more to it?
     
  14. jnakai

    jnakai

    Joined:
    Aug 28, 2009
    Posts:
    38
    If you're still having that problem, my guess is the FlurryAgent.jar isn't being imported properly. I can't point to any posts, but I seem to remember some people having trouble with .jar's not updating.

    And huge thanks to you ZeroStride, this plugin was amazing!
     
  15. koki

    koki

    Joined:
    Nov 27, 2009
    Posts:
    43
    Hi guys, i'm having the same problem as eltonbird. The package name might be the problem? Do you guys have modified the manifest file to get it working?

    Any help would be much appreciated.

    Thanks
     
  16. SeikoTheWiz

    SeikoTheWiz

    Joined:
    Aug 1, 2011
    Posts:
    69
    Is there the same kind of wrapper available for iphone?

    Thank you!
     
  17. reissgrant

    reissgrant

    Joined:
    Aug 20, 2009
    Posts:
    726
    Wow awesome, thank you!
     
  18. HazeTI

    HazeTI

    Joined:
    Jan 12, 2012
    Posts:
    83
    This was incredibly useful. Thanks for sharing.

    A couple of notes for others who stumble upon here.
    Read This
    http://unity3d.com/support/documentation/Manual/PluginsForAndroid.html
    Highly recommended so that you know what is going on.

    If your app crashes on load make sure AndroidJavaClass("com.flurry.android.FlurryAgent"); is not failing.
    If it is failing make sure your .jar file is in the correct location otherwise Unity won't find it.
    Make sure the .jar file goes in Assets/Plugins/Android. I had mine in Assets/Assets/Plugins/Android and that caught me out for a few hours!
     
  19. majidrafiq

    majidrafiq

    Joined:
    Apr 24, 2012
    Posts:
    1
    I have a query that have you implemented the functions for App Circle in .jar as I have tried to access appCircle default function names but unity giving error. Flurry Analytic is working fine.
     
  20. sheva

    sheva

    Joined:
    Nov 22, 2010
    Posts:
    157
    If you have some problems ... here's my way :

    I made it work in this way :

    1) I downloaded the sdk ( the first comment of the post )
    2) Put FlurryAgent.cs FlurryAgent.jar in Assets/ Plugin / Android..
    2) Created a Script called "Example.cs" attached on an Object which is always active.
    3) on the Start() function write these strings :
    Code (csharp):
    1.  
    2.                 _FlurryAgent = new FlurryAgent();     // need to Initialize the script
    3.         _FlurryAgent.onStartSession("insert here your unique ID of the app");    
    4.         _FlurryAgent.logEvent("Application is opened"); // on your events web site, you'll get this notification.
    5.         _FlurryAgent.onPageView(); // to increment the analytics.  
    6.  
    4) Remember to call only once onStartSession() before opening a new one. You must CLOSE it before calling onStartSession() another time.

    5) Then write this code inside the Example.cs :
    Code (csharp):
    1.  
    2.     public void OnApplicationQuit()
    3.     {
    4.         _FlurryAgent.onEndSession();   
    5.     }
    6.  
    6) Then you have to set up your Manifest :
    add this code after your activities :
    Code (csharp):
    1. <uses-permission android:name="android.permission.INTERNET" />
    2.     <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    3.     <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    7) Then I added also a new activity but it seems to work also without it. Anyway my advice is to add it inside your activities:

    Code (csharp):
    1. <activity android:name="com.flurry.android.FlurryAgent" android:configChanges="keyboardHidden|orientation" />
    Wait 2-3 hours. You'll see your notification on the flurry web site !

    8) Enjoy. I wrote these steps cause I had some problems in setting flurry analytics up. So I'll write my way.

    Good Luck Guys,
    Sheva
     
  21. hirenkacha

    hirenkacha

    Joined:
    Apr 4, 2012
    Posts:
    10
    In my case I am not able to run this in my game. When I tried

    FlurryAgent f = new FlurryAgent();

    void Start ()
    {
    touchFlag=true;
    f.onStartSession("N4BT8BKTN8MNTG999999");
    }


    void Update ()
    {
    if(touchFlag)
    {

    f.logEvent("Test");
    touchFlag=false;
    }


    if(Input.GetKey(KeyCode.Escape))
    {
    f.onEndSession();
    }
    }

    This makes my game not runnable. My game is crashing while loading the scene.

    <application
    android:icon="@drawable/icon"
    android:label="app_name"
    android:debuggable="true">
    <activity android:name="com.flurry.android.FlurryAgent" android:configChanges="keyboardHidden|orientation" />
    <activity android:name="com.unity3d.player.UnityPlayerProxyActivity"
    android:label="app_name"
    android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
    <intent-filter>
    <action android:name="android.intent.action.MAIN" />
    <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
    </activity>
    <activity android:name="com.unity3d.player.UnityPlayerActivity"
    android:label="app_name"
    android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
    </activity>
    <activity android:name="com.unity3d.player.UnityPlayerNativeActivity"
    android:label="app_name"
    android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
    <meta-data android:name="android.app.lib_name" android:value="unity" />
    <meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="false" />
    </activity>
    <activity android:name="com.unity3d.player.VideoPlayer"
    android:label="app_name"
    android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
    </activity>
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    </application>

    This is my AndroidManifest.xml file in plugin/Android..

    If I am not using any FlurryAgent methods in my code then also its not running. Its not working for me. is there any issue with my xml file?
     
  22. sheva

    sheva

    Joined:
    Nov 22, 2010
    Posts:
    157
    Did you try it in a simple project ?
    Try to do a simple project before integrating it in your real game. In my previous post I've written all you need to make it work.
     
  23. hirenkacha

    hirenkacha

    Joined:
    Apr 4, 2012
    Posts:
    10
    I still face the problem. I made a fresh project and integrated the flurryAgent in it.
    But the project is still getting force close dialog.

    The errors I get in Logcat is

    FATAL EXCEPTION: Thread-17
    java.lang.ClassNotFoundException: com.flurry.android.FlurryAgent
    at java.lang.Class.classForName(Native Method)
    at java.lang.Class.forName(Class.java:234)
    at java.lang.Class.forName(Class.java:181)
    at dalvik.system.NativeStart.run(Native Method)
    Caused by: java.lang.NoClassDefFoundError: com.flurry.android.FlurryAgent
    Caused by: java.lang.ClassNotFoundException: com.flurry.android.FlurryAgent in loader dalvik.system.PathClassLoader[.]
    at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
    Force finishing activity com.mile9/com.unity3d.player.UnityPlayerNativeActivity


    Is this the problem of my unity version? I am using 3.5.0 (not Pro).
     
  24. sheva

    sheva

    Joined:
    Nov 22, 2010
    Posts:
    157
    Have you done perfectly all steps I described ?
    It's not because of your Unity.
     
  25. hirenkacha

    hirenkacha

    Joined:
    Apr 4, 2012
    Posts:
    10
    Yeah thanks... Working for me also. The problem was in my AndroidManifest.xml file. I was modifying "app_name".
    Which should not be changed. thanks again sheva for your help.

    Great work ZeroStride..
    thanks for sharing this with us..
     
    Last edited: Oct 30, 2012
  26. aleksey_173

    aleksey_173

    Joined:
    Jul 11, 2012
    Posts:
    24
    Hi, hirenkacha!

    It seems to me I am stuck with your problem, but even thouth you have mantioned, that "... The problem was in my AndroidManifest.xml file. I was modifying "app_name".", I cannot understand what is it possible to modify at all?! I add the lines as Sheva posted.

    Here is my xml:

    <?xml version="1.0" encoding="utf-8"?>
    <manifest
    xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.unity3d.player"
    android:installLocation="preferExternal"
    android:versionCode="1"
    android:versionName="1.0">
    <supports-screens
    android:smallScreens="true"
    android:normalScreens="true"
    android:largeScreens="true"
    android:xlargeScreens="true"
    android:anyDensity="true"/>

    <application
    android:icon="@drawable/app_icon"
    android:label="@string/app_name"
    android:debuggable="true">
    <activity android:name="com.unity3d.player.UnityPlayerProxyActivity"
    android:label="@string/app_name"
    android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
    <intent-filter>
    <action android:name="android.intent.action.MAIN" />
    <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
    </activity>
    <activity android:name="com.unity3d.player.UnityPlayerActivity"
    android:label="@string/app_name"
    android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
    </activity>
    <activity android:name="com.unity3d.player.UnityPlayerNativeActivity"
    android:label="@string/app_name"
    android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
    <meta-data android:name="android.app.lib_name" android:value="unity" />
    <meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="false" />
    </activity>
    <activity android:name="com.unity3d.player.VideoPlayer"
    android:label="@string/app_name"
    android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
    </activity>
    <uses-permission android:name="android.permission.INTERNET" />

    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />

    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <activity android:name="com.flurry.android.FlurryAgent" android:configChanges="keyboardHidden|orientation" />
    </application>
    </manifest>


    Could anybody help?

    Thanks in advance!

    Oleksii
     
  27. aleksey_173

    aleksey_173

    Joined:
    Jul 11, 2012
    Posts:
    24
    in case you are still in trouble - here is a solution:

    Go to prime31 and buy it for 50 bucks..ha-ha
     
  28. dragologic

    dragologic

    Joined:
    Oct 28, 2012
    Posts:
    16
    How to get ads playing? I have added to FlurryAgent.cs so far:
    Code (csharp):
    1.  
    2. public void initializeAds() {
    3.     using(AndroidJavaClass cls_UnityPlayer = new AndroidJavaClass("com.unity3d.player.UnityPlayer"))
    4.     {
    5.     using(AndroidJavaObject obj_Activity = cls_UnityPlayer.GetStatic<AndroidJavaObject>("currentActivity"))
    6.         {
    7.             cls_FlurryAgent.CallStatic("initializeAds", obj_Activity);
    8.         }
    9.     }
    10. }
    11. public void getAd(String adSpace) {
    12.     using(AndroidJavaClass cls_UnityPlayer = new AndroidJavaClass("com.unity3d.player.UnityPlayer"))
    13.     {
    14.     using(AndroidJavaObject obj_Activity = cls_UnityPlayer.GetStatic<AndroidJavaObject>("currentActivity"))
    15.     {
    16.     //cls_FlurryAgent.CallStatic("getAd",obj_Activity, adSpace, ViewGroup viewSpace,FlurryAdSize size, long timeout);
    17.     }
    18. }
    19.  
    What should I put for ViewGroup viewSpace,FlurryAdSize size, long timeout?
     
    Last edited: Dec 10, 2012
  29. sheva

    sheva

    Joined:
    Nov 22, 2010
    Posts:
    157
    have you already tried with a empty project? if yes, have you done step by step everything?
     
  30. T0zy

    T0zy

    Joined:
    Jan 22, 2013
    Posts:
    2
    Hello! This thread has been really helpful to set up my flurry :D

    However, i'm not getting any data to my flurry account :/ I double and triple checked the Key to the session starts, I added some session starts and ends that I was missing folowing the comments above, I even added some logs to see if there was network connection (and there was).
    I'm not getting any errors in the console when I run the game in the Android device... and after a month... still no data.
    I don't even know how to debug this, I'm just the game designer, and the official documentation is of little help as I understand that the files linked in this posts are only an implementation for Unity.
     
  31. SynStyxx

    SynStyxx

    Joined:
    Mar 21, 2013
    Posts:
    2
    Bear with me... im still new to unity and in particular integrating flurry. So... I think I have this right but im getting an error.

    I followed all your steps Sheva and i created AndroidManifest.xml in the Assets/ Plugin / Android folder as such:

    <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="preferExternal" package="com.ToxicTaste.STMonkey" android:versionName="1.0" android:versionCode="1">
    <supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" android:anyDensity="true" />
    <application android:icon="@drawable/app_icon" android:label="@string/app_name" android:debuggable="false">
    <activity android:name="com.flurry.android.FlurryAgent" android:configChanges="keyboardHidden|orientation" /></activity>
    </application>
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    </manifest>

    I can add more from the previous builds temp file if required.

    for the example.cs, i gave the file a slightly different name appStartFlurry.cs like:

    using UnityEngine;
    using System.Collections;

    public class appStartFlurry : MonoBehaviour {

    // Use this for initialization
    void Start () {
    _FlurryAgent = new FlurryAgent(); // need to Initialize the script
    _FlurryAgent.onStartSession("insert here your unique ID of the app");
    _FlurryAgent.logEvent("Application is opened"); // on your events web site, you'll get this notification.
    _FlurryAgent.onPageView(); // to increment the analytics.
    }

    // Update is called once per frame
    void Update () {

    }

    public void OnApplicationQuit()
    {
    _FlurryAgent.onEndSession();
    }
    }

    but with my app id in place.


    the error message im getting is: Assets/Scripts/appStartFlurry.cs(11,17): error CS0103: The name `_FlurryAgent' does not exist in the current context

    any help with this is hugely appreciated as its for my final uni project and I have been going round in circles with this, and times getting shorter.

    thanks, Syn
     
  32. SynStyxx

    SynStyxx

    Joined:
    Mar 21, 2013
    Posts:
    2
    Ok, from what i can tell, i have the manifest now set up perfectly. had to make some changes to make sure it corresponding with the exact required output. im still getting the issue though with the above error message.it seems to have an issue with my Flurry Agent call. i feel like i am missing something at the start to make the _FlurryAgent work. I can paste my full manifest in here, but from what i can tell, it seems to be specifically in the Start(). Again, apologies, this could be a simple thing thats easy to solve, but im pretty green in working with this stuff, so if anyone has any idea.?
     
  33. seandanger

    seandanger

    Joined:
    Jun 13, 2012
    Posts:
    39
    @SynStyxx, looks like you need to declare your _FlurryAgent variable. That step isn't shown in Sheva's walkthrough. Add this directly after your public class appStartFlurry : MonoBehaviour { line:

    Code (csharp):
    1. private FlurryAgent _FlurryAgent;
    If FlurryAgent is inside another namespace, you'll need to import that namespace too.
     
  34. jeeyoh

    jeeyoh

    Joined:
    Feb 4, 2013
    Posts:
    4
    I'm trying this out but should there be an error when running it in the editor?

    I'm getting this type of errors

    JNI: Unable to find field id for 'currentActivity' (static)
    UnityEngine.AndroidJavaObject:GetStatic(String)
    FlurryAgent:eek:nStartSession(String) (at Assets/Plugins/Android/FlurryAgent.cs:68)
    main:Start() (at Assets/Sample/main.cs:16)
     
  35. hirenkacha

    hirenkacha

    Joined:
    Apr 4, 2012
    Posts:
    10
    Try shifting <activity android:name="com.flurry.android.FlurryAgent" android:configChanges="keyboardHidden|orientation" /> above all activities as I did in my xml file.
     
  36. junglejusteen

    junglejusteen

    Joined:
    Mar 25, 2013
    Posts:
    2
    Do you guys know how to get the user's age to put in the SetAge function?? Thanks in advance! :D
     
  37. DrakosGate

    DrakosGate

    Joined:
    Aug 22, 2013
    Posts:
    1
    Howdy guys and girls. I'm having some troubles with this plugin (and implementing flurry manually) at the moment and can't for the life of me figure out what's wrong :(
    I've found that it keeps getting stuck around the StartSession functions. I have triple-checked that I am initialising flurry with the right key.
    I'm launching a cube as a test after calling this function and, while in Unity it flies off, but as soon as I run the app on android the cube just stays there, like it's stuck in an infinite loop.
    Is anyone experiencing similar issues??
     
  38. hexdump

    hexdump

    Joined:
    Dec 29, 2008
    Posts:
    443
    Hi!;

    Can anybody using this plugin confirm it is still working?. It logs my sessions but it seems not to get my events I sent with FlurryAgent.Instance.logEvent("game_started");


    Please any confirmation would be great.

    Thanks in advance.
     
  39. robindelange

    robindelange

    Joined:
    May 11, 2013
    Posts:
    1
    The included SDK in the package is 2.1 which I think is quite outdated by now. Is there a way to update the SDK and continue to use the package?
     
  40. afrokick

    afrokick

    Joined:
    May 13, 2011
    Posts:
    6
    Just download the latest SDK from flurry.com and put it into a folder (Assets/Plugins/Android/FlurryAgent.jar)
     
  41. wildbunny

    wildbunny

    Joined:
    Apr 17, 2014
    Posts:
    2
    Could you give us some more elaborate instructions on that? The SDK doesn't provide the Unity wrapper (FlurryAgent.jar), only java libraries (if that's even the proper name for that) for integrating Flurry through ADK.

    [EDIT] Ok, let me back up for a second here. The .cs in this package IS the wrapper, and flurryagent.jar is flurry's sdk (the 2.1) version. Afrokick is absolutely right, just place the latest Flurry SDK jars in plugins/android!

    It confused me, because currently they supply two separate .jars (one for analytics and the other for ads), the older SDKs had only one (flurryagent.jar)!

    I assumed someone combined those into a single library for this to work.. my bad.. noob.. :)
     
    Last edited: Apr 19, 2014
  42. wildbunny

    wildbunny

    Joined:
    Apr 17, 2014
    Posts:
    2
    This whole thread is a bit dated, but having recently set up a game to use flurry using this particular solution, I'd like to share a little trick I came up with.

    Flurry updates reeeealy slowly, so if you're impatient like me, set up a new android app through the flurry web interface, integrate flurry using this plugin (android manifest is the key here, especially if you use other stuff that require activities).
    Under "manage" (where the app id is located), under SDK version, you'll see something like: "no data available". Test your app and if any data got through to flurry's servers you'll see your SDK version number (it's 2.1, if using this wrapper) practically instantly! Neat, huh.. :)

    Otherwise, use logcat..
     
    Last edited: Apr 19, 2014
  43. yashesh

    yashesh

    Joined:
    Jan 11, 2013
    Posts:
    10
  44. Manu_Gupta

    Manu_Gupta

    Joined:
    Jun 18, 2014
    Posts:
    3
    Hi, I have a problem with setting up Flurry in my Android game. I did everything what is described above but my console says that Exception: JNI: Init'd AndroidJavaClass with null ptr!
    My code is given below

    publicclassmain : MonoBehaviour {


    privatestringFLURRY_API = "PPJNXV3ZZ3XV6NP4ZJBB";

    //Usethisforinitialization
    voidStart () {
    FlurryAgent.Instance.onStartSession(FLURRY_API);
    }

    //Updateiscalledonceperframe
    voidUpdate () {

    if(Time.frameCount%300==0)
    FlurryAgent.Instance.logEvent("test update");
    }

    voidOnDestroy(){
    FlurryAgent.Instance.onEndSession();
    }
    }

    If anyone could help me I'd be grateful....
     
  45. alello

    alello

    Joined:
    Feb 4, 2014
    Posts:
    1


    I have the same problem.

    The events appear in the panel, but the counters are all zero.

    Is there anyone who has managed to run logevent?

    The event counters are updated every 24 hours? Or just a few hours? It's been 6 hours but the counters are stopped.
     
  46. VamshiKrishnaP

    VamshiKrishnaP

    Joined:
    Jan 17, 2013
    Posts:
    16
    Hi All,

    Great plugin !!!

    How can i update with multiple parameters in logEvent ?

    Can anyone suggest ?
     
  47. dttngan91

    dttngan91

    Joined:
    Nov 21, 2013
    Posts:
    80
    Can I log event with parameters like score or time which user played in game?