Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Flurry plug-in works on Android, or not? — Gideros Forum

Flurry plug-in works on Android, or not?

edited April 2014 in General questions
Well, currently my Corona games use Flurry...

Naturally we decided to use Flurry on Gideros too. So I checked, and a plug-in exists, yay!

Except on the manual, the "Supported platforms:" show an Android icon (and a iOS icon).

But this is on the text: "Flurry is available only for iOS as an external plugin."

So I wonder, what part of the manual is wrong? Flurry works on Android, or not? (And can someone fix the manual?)
I make games for children: http://www.kidoteca.com

Comments

  • ar2rsawseenar2rsawseen Maintainer
    @speeder_kidoteca sorry for confusion, there was a bug in Android Flurry, which will be fixed in next version. For now you can get the fixed binaries here:
    http://giderosmobile.com/forum/discussion/comment/34167#Comment_34167

    Likes: hgvyas123, zoolax

    +1 -1 (+2 / -0 )Share on Facebook
  • I did not tried downloading the plug-in itself yet, I was asking about the manual...

    Your replies made things look even worse, not better O.o
    I make games for children: http://www.kidoteca.com
  • ar2rsawseenar2rsawseen Maintainer
    :D
    Manual is the same as ios, only installation differs, basically copying the files and including external class in main activity (as all android plugins)
  • Aaaah, I see (no, I don't).

    But I guess I can figure something out.

    You should still fix the manual though.
    I make games for children: http://www.kidoteca.com
  • Alright, I am trying to make flurry work on android...

    It crashes instead.

    I followed the install.html that came with the plug-in zip (that by the way, is very badly written, I had to read each sentence 3 or 4 times before understanding... or I THINK I understood, since if I had really understood probably it would work instead of crashing).
    I make games for children: http://www.kidoteca.com
  • ar2rsawseenar2rsawseen Maintainer
    1) Dowload Analytics .jar from Flurry and put it in the libs folder
    2) Put libflurry.so files in corresponding folders inside libs directory (armeabi to armeabi, armeabi-v7a to armeabi-v7a, x86 to x86)
    3) Put GFlurry.java inside src\com\giderosmobile\android\plugins\flurry
    4) Open your main activity file, which is located in src\com\giderosmobile\android and put inside
    a) System.loadLibrary("flurry"); where all the other libs as System.loadLibrary("gideros"); are loaded
    b) "com.giderosmobile.android.plugins.flurry.GFlurry", to a an externalClasses array

    Run the app, if its not working, copy log cat output and come here :)
    +1 -1 (+3 / -0 )Share on Facebook
  • Alright, the first step is wrong, but I dunno how to fix it.

    Eclipse is not finding or loading the .jar, I get a compilation error

    The import com.flurry cannot be resolved FlurryPlugin.java /amazoniagideros/src/com/giderosmobile/android/plugins/flurry line 8
    I make games for children: http://www.kidoteca.com
  • Alright, I forgot to refresh after step one!

    Now I tried running again, and it crashed again:

    04-22 16:10:26.277: I/ActivityManager(229): Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.kidoteca.nono.amazonia/com.giderosmobile.android.amazoniagiderosActivity } from pid 29417
    04-22 16:10:26.297: I/ActivityManager(229): Start proc com.kidoteca.nono.amazonia for activity com.kidoteca.nono.amazonia/com.giderosmobile.android.amazoniagiderosActivity: pid=29425 uid=10135 gids={1015, 3003}
    04-22 16:10:26.307: D/AndroidRuntime(29417): Shutting down VM
    04-22 16:10:26.307: D/dalvikvm(29417): GC_CONCURRENT freed 103K, 69% free 321K/1024K, external 0K/0K, paused 1ms+0ms
    04-22 16:10:26.307: D/dalvikvm(29417): Debugger has detached; object registry had 1 entries
    04-22 16:10:26.347: D/dalvikvm(29425): Debugger has detached; object registry had 1 entries
    04-22 16:10:26.457: D/dalvikvm(29425): Trying to load lib /mnt/asec/com.kidoteca.nono.amazonia-1/lib/libzlib.so 0x2afc66a0
    04-22 16:10:26.457: D/dalvikvm(29425): Added shared lib /mnt/asec/com.kidoteca.nono.amazonia-1/lib/libzlib.so 0x2afc66a0
    04-22 16:10:26.457: D/dalvikvm(29425): No JNI_OnLoad found in /mnt/asec/com.kidoteca.nono.amazonia-1/lib/libzlib.so 0x2afc66a0, skipping init
    04-22 16:10:26.457: D/dalvikvm(29425): Trying to load lib /mnt/asec/com.kidoteca.nono.amazonia-1/lib/libgvfs.so 0x2afc66a0
    04-22 16:10:26.457: D/dalvikvm(29425): Added shared lib /mnt/asec/com.kidoteca.nono.amazonia-1/lib/libgvfs.so 0x2afc66a0
    04-22 16:10:26.457: D/dalvikvm(29425): No JNI_OnLoad found in /mnt/asec/com.kidoteca.nono.amazonia-1/lib/libgvfs.so 0x2afc66a0, skipping init
    04-22 16:10:26.467: D/dalvikvm(29425): Trying to load lib /mnt/asec/com.kidoteca.nono.amazonia-1/lib/liblua.so 0x2afc66a0
    04-22 16:10:26.467: D/dalvikvm(29425): Added shared lib /mnt/asec/com.kidoteca.nono.amazonia-1/lib/liblua.so 0x2afc66a0
    04-22 16:10:26.467: D/dalvikvm(29425): No JNI_OnLoad found in /mnt/asec/com.kidoteca.nono.amazonia-1/lib/liblua.so 0x2afc66a0, skipping init
    04-22 16:10:26.467: D/dalvikvm(29425): Trying to load lib /mnt/asec/com.kidoteca.nono.amazonia-1/lib/libgideros.so 0x2afc66a0
    04-22 16:10:26.478: D/dalvikvm(29425): Added shared lib /mnt/asec/com.kidoteca.nono.amazonia-1/lib/libgideros.so 0x2afc66a0
    04-22 16:10:26.478: D/dalvikvm(29425): No JNI_OnLoad found in /mnt/asec/com.kidoteca.nono.amazonia-1/lib/libgideros.so 0x2afc66a0, skipping init
    04-22 16:10:26.478: D/dalvikvm(29425): Trying to load lib /mnt/asec/com.kidoteca.nono.amazonia-1/lib/libluasocket.so 0x2afc66a0
    04-22 16:10:26.478: D/dalvikvm(29425): Added shared lib /mnt/asec/com.kidoteca.nono.amazonia-1/lib/libluasocket.so 0x2afc66a0
    04-22 16:10:26.478: D/dalvikvm(29425): Trying to load lib /mnt/asec/com.kidoteca.nono.amazonia-1/lib/liblfs.so 0x2afc66a0
    04-22 16:10:26.478: D/dalvikvm(29425): Added shared lib /mnt/asec/com.kidoteca.nono.amazonia-1/lib/liblfs.so 0x2afc66a0
    04-22 16:10:26.478: D/dalvikvm(29425): Trying to load lib /mnt/asec/com.kidoteca.nono.amazonia-1/lib/libggooglebilling.so 0x2afc66a0
    04-22 16:10:26.478: D/dalvikvm(29425): Added shared lib /mnt/asec/com.kidoteca.nono.amazonia-1/lib/libggooglebilling.so 0x2afc66a0
    04-22 16:10:26.478: D/dalvikvm(29425): Trying to load lib /mnt/asec/com.kidoteca.nono.amazonia-1/lib/liblsqlite3.so 0x2afc66a0
    04-22 16:10:26.478: D/dalvikvm(29425): Added shared lib /mnt/asec/com.kidoteca.nono.amazonia-1/lib/liblsqlite3.so 0x2afc66a0
    04-22 16:10:26.478: D/dalvikvm(29425): Trying to load lib /mnt/asec/com.kidoteca.nono.amazonia-1/lib/libjson.so 0x2afc66a0
    04-22 16:10:26.478: D/dalvikvm(29425): Added shared lib /mnt/asec/com.kidoteca.nono.amazonia-1/lib/libjson.so 0x2afc66a0
    04-22 16:10:26.487: D/dalvikvm(29425): Trying to load lib /mnt/asec/com.kidoteca.nono.amazonia-1/lib/libbitop.so 0x2afc66a0
    04-22 16:10:26.487: D/dalvikvm(29425): Added shared lib /mnt/asec/com.kidoteca.nono.amazonia-1/lib/libbitop.so 0x2afc66a0
    04-22 16:10:26.487: D/dalvikvm(29425): Trying to load lib /mnt/asec/com.kidoteca.nono.amazonia-1/lib/libflurry.so 0x2afc66a0
    04-22 16:10:26.487: W/dalvikvm(29425): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lcom/giderosmobile/android/amazoniagiderosActivity;
    04-22 16:10:26.487: W/dalvikvm(29425): Class init failed in newInstance call (Lcom/giderosmobile/android/amazoniagiderosActivity;)
    04-22 16:10:26.487: D/AndroidRuntime(29425): Shutting down VM
    04-22 16:10:26.487: W/dalvikvm(29425): threadid=1: thread exiting with uncaught exception (group=0x2aac8578)
    04-22 16:10:26.497: E/AndroidRuntime(29425): FATAL EXCEPTION: main
    04-22 16:10:26.497: E/AndroidRuntime(29425): java.lang.ExceptionInInitializerError
    04-22 16:10:26.497: E/AndroidRuntime(29425): at java.lang.Class.newInstanceImpl(Native Method)
    04-22 16:10:26.497: E/AndroidRuntime(29425): at java.lang.Class.newInstance(Class.java:1409)
    04-22 16:10:26.497: E/AndroidRuntime(29425): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
    04-22 16:10:26.497: E/AndroidRuntime(29425): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1573)
    04-22 16:10:26.497: E/AndroidRuntime(29425): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1675)
    04-22 16:10:26.497: E/AndroidRuntime(29425): at android.app.ActivityThread.access$1500(ActivityThread.java:121)
    04-22 16:10:26.497: E/AndroidRuntime(29425): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:943)
    04-22 16:10:26.497: E/AndroidRuntime(29425): at android.os.Handler.dispatchMessage(Handler.java:99)
    04-22 16:10:26.497: E/AndroidRuntime(29425): at android.os.Looper.loop(Looper.java:130)
    04-22 16:10:26.497: E/AndroidRuntime(29425): at android.app.ActivityThread.main(ActivityThread.java:3701)
    04-22 16:10:26.497: E/AndroidRuntime(29425): at java.lang.reflect.Method.invokeNative(Native Method)
    04-22 16:10:26.497: E/AndroidRuntime(29425): at java.lang.reflect.Method.invoke(Method.java:507)
    04-22 16:10:26.497: E/AndroidRuntime(29425): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
    04-22 16:10:26.497: E/AndroidRuntime(29425): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:624)
    04-22 16:10:26.497: E/AndroidRuntime(29425): at dalvik.system.NativeStart.main(Native Method)
    04-22 16:10:26.497: E/AndroidRuntime(29425): Caused by: java.lang.UnsatisfiedLinkError: Cannot load library: reloc_library[1314]: 111 cannot locate 'lua_getfield'...
    04-22 16:10:26.497: E/AndroidRuntime(29425): at java.lang.Runtime.loadLibrary(Runtime.java:434)
    04-22 16:10:26.497: E/AndroidRuntime(29425): at java.lang.System.loadLibrary(System.java:554)
    04-22 16:10:26.497: E/AndroidRuntime(29425): at com.giderosmobile.android.amazoniagiderosActivity.(amazoniagiderosActivity.java:35)
    04-22 16:10:26.497: E/AndroidRuntime(29425): ... 15 more
    04-22 16:10:26.497: W/ActivityManager(229): Force finishing activity com.kidoteca.nono.amazonia/com.giderosmobile.android.amazoniagiderosActivity
    I make games for children: http://www.kidoteca.com
  • @speeder_kidoteca Do a refresh and a clean in Eclipse. I did exactly how @ar2rsawseen commented in his post and it works (in a game published a week or two ago).
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • edited April 2014
    How I do that?

    EDIT: I right clicked the project and clicked "refresh" and then I clicked Project (on the menu on the top) and clicked clean.

    Then I tried again, same result.
    I make games for children: http://www.kidoteca.com
  • It maybe a problem with Eclipse? On the click section untick clean everything and tick just that project. Then clean again.
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • ar2rsawseenar2rsawseen Maintainer
    @speeder_kidoteca it seems as you told in the other thread, you were using old Gideros version (or old exported project from old Gideros version).

    Basically in your error it states that lua is not defined because in new Gideros Lua was separated and is as separate file (liblua.so)
    If you do a clean export it should be all ok.

    And about Flurry:
    Make sure to take the plugin from this link:
    http://giderosmobile.com/forum/discussion/comment/34167#Comment_34167

    As you have somewhere stated that you have FlurryPlugin.java that sounds incorrect, the real file should be GFlurry.java

    Likes: SinisterSoft

    +1 -1 (+1 / -0 )Share on Facebook
  • Yes, FlurryPlugin.java is old, that one had me fooled for 30 mins. ;)
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • Indeed, I was using hgvyas123 link instead of your link ar2 :(

    Lost a day because of that :(

    But thanks! It seemly works now (well, it does not crash... the logcat is not capturing anything, now I will see why is that)
    I make games for children: http://www.kidoteca.com
  • Alright, how I figure if flurry is working or not?

    Currently I pasted this on the top of my main.lua:

    _G.flurry = require "flurry";
    print("flurry available", flurry.isAvailable());
    if flurry.isAvailable() then
    flurry.startSession("MYACTUALAPIKEYHERE");
    flurry.logEvent("test_start", {key1="value1", key2="value2", key3="value3", key4="value4", key5="value5", key6="value6", key7="value7", key8="value8", key9="value9", key10="value10", key11="value11", key12="value12",})
    end


    But I get no print (at all... where Gideros prints stuff when testing on device?) and there is nothing about flurry in the logcat either (Even if I look at it unfiltered).

    Also flurry site does not report anything (no event, no session...)
    I make games for children: http://www.kidoteca.com
  • ar2rsawseenar2rsawseen Maintainer
    edited April 2014
    Hello @speeder_kidoteca

    simply delete the assets folder inside assets folder in your exported project. That will automatically make the android apk to behave as normal Gideros player (with all your preinstalled plugins), and you will be able to launch your app from Gideros Studio and test it and see prints in the Ouput pane in Gideros Studio

    Also note that there should pass some time for event to appear on Flurry website (possibly even a day).
  • ar2rsawseenar2rsawseen Maintainer
    Also I just tested, and new Flurry version does not give out any logcat output, but if putting manual log print in java file it all indicates its working correctly.

    Here are my test files, including Gideros project, exported android project with installed Flurry plugin and Gideros Android player with installed Flurry plugin.

    But I believe that your set up most probably works correctly.

    And where did you guys found the old version? tell me so I can remove all the references to it.

    zip
    zip
    FlurryGideros.zip
    1K
    zip
    zip
    Flurry.zip
    9M
    zip
    zip
    FlurryAPK.zip
    4M
  • ar2rsawseen

    I got it from this thread, the reply from hgvyas123

    Also I am seeing inconsistant results, Flurry site started to get my events, some events it did get, some not, and sometimes it get events ,sometimes not, for now seemly it is random.

    Also I need to know where the 10 parameter limit came from, I think my flurry project on Corona has a event with much more than 10 parametes (there is a event that has a parameter for every system variable you can get, for example on iOS the OS number, model number, CPU type, OpenGL variables, etc...)
    I make games for children: http://www.kidoteca.com
  • ar2rsawseenar2rsawseen Maintainer
    That is probably an old limitation of Flurry, now in the code (atleast on Android part) I don't see any limit to 10 parameter, all that you pass to the lua function should be delivered to Flurry java plugin for it to handle it further. So if Flurry can handle it, it should work.
    If you still have this problem, ping me and I will do more thorough testing
  • Well, I could not wait for you to reply and did lots of testing in April 23 after my post (and had lots of patience waiting for flurry site to update).

    Yes, anything with more than 10 parameters has... kinda of undefined behaviour.

    I read your plug-in source, and then not finding anything there I did tests, and then went to scrounge Flurry site for information.

    What I found out is that according to flurry manual having more than 10 parameters the result should be your event still being logged, but with no parameters at all...

    The observed behaviour is just random, sometimes the event fails to log, sometimes the entire session fails to log, sometimes it logs as the manual says (it logs without parameters).

    This interacted badly with something else (after removing 10 parameter logs from my code, I am still having flurry issues, but much less, I will wait for some days to see if flurry update logs corretly to me figure what is wrong) and the result was hair raising, and part of my woes earlier.

    I sugest you update the manual to make VERY, VERY, VERY clear that flurry breaks in unexpected ways if you send more than 10 parameters, or even better, add that limitation to the plug-in with a assert or console message telling you that, because from my tests if you send more than 10 parameters to flurry API, it WILL break (and not even in the way their manual states).

    Likes: ar2rsawseen

    I make games for children: http://www.kidoteca.com
    +1 -1 (+1 / -0 )Share on Facebook
  • seppseppseppsepp Member
    edited January 2015
    Run the app, if its not working, copy log cat output and come here :)
    I can't get it working. Here is the LogCat output:
    02-01 03:15:04.838: E/AndroidRuntime(10588): java.lang.NoClassDefFoundError: com/flurry/android/FlurryEventRecordStatus
    02-01 03:15:04.838: E/AndroidRuntime(10588): 	at com.flurry.android.FlurryAgent.logEvent(SourceFile:610)
    02-01 03:15:04.838: E/AndroidRuntime(10588): 	at com.giderosmobile.android.plugins.flurry.GFlurry.logEvent(GFlurry.java:67)
    02-01 03:15:04.838: E/AndroidRuntime(10588): 	at com.giderosmobile.android.player.GiderosApplication.nativeDrawFrame(Native Method)
    02-01 03:15:04.838: E/AndroidRuntime(10588): 	at com.giderosmobile.android.player.GiderosApplication.onDrawFrame(GiderosApplication.java:492)
    02-01 03:15:04.838: E/AndroidRuntime(10588): 	at com.giderosmobile.android.GiderosRenderer.onDrawFrame(SoledadActivity.java:273)
    02-01 03:15:04.838: E/AndroidRuntime(10588): 	at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1523)
    02-01 03:15:04.838: E/AndroidRuntime(10588): 	at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240)
    02-01 03:15:04.838: E/AndroidRuntime(10588): Caused by: java.lang.IllegalStateException: Flurry SDK must be initialized before starting a session
    02-01 03:15:04.838: E/AndroidRuntime(10588): 	at com.flurry.android.FlurryAgent.onStartSession(SourceFile:328)
    02-01 03:15:04.838: E/AndroidRuntime(10588): 	at com.giderosmobile.android.plugins.flurry.GFlurry.startSession(GFlurry.java:45)
    02-01 03:15:04.838: E/AndroidRuntime(10588): 	... 5 more
    02-01 03:15:07.851: I/Process(10588): Sending signal. PID: 10588 SIG: 9
    What's happening there? Flurry SDK is current 5.1.0
  • @seppsepp it seems that you are logging event before initiating flurry with appId
  • @ar2rsawseen I have the same issue as seppsepp.
    When debugging, it seems that the error appears when calling FlurryAgent.onStartSession() before any logEvent()
    Maybe this is due to the new 5.X SDK, as stated on this page:
    https://developer.yahoo.com/flurry/docs/analytics/gettingstarted/android_sdk_upgrade_5/
    I tried putting FlurryAgent.init(sActivity.get(), API_KEY) before the FlurryAgent.onStartSession() but I ran into some other error.

    Did you manage to make it work with SDK 5.5?

    Thanks!
  • @ar2rsawseen
    Thanks for the patch, I tried it, I now have the same error as when I called init() right before onStartSession().
    It makes me think that I used the bin libraries found there:
    http://giderosmobile.com/forum/discussion/1663/android-flurry-plugin/p1

    Are these the correct libs files?

    Does the error tells you anything about what I did wrong?

    Thanks in advance!
    Here is the error output:
    http://pastebin.com/hBs9LDzu
  • ar2rsawseenar2rsawseen Maintainer
    This error does not actually seems to be related to Flurry, but rather to Google Play Services.
    Have you set them up correctly?
  • I thought this was the error:
    06-09 10:20:57.159: W/System.err(955): java.lang.NullPointerException: Attempt to invoke virtual method 'java.util.List com.flurry.sdk.ip.a()' on a null object reference
    06-09 10:20:57.159: W/System.err(955): at com.flurry.sdk.in.g(SourceFile:215)
    For the google play services, I imported google_play_services_lib from android sdk into my eclipse workspace and added it as a dependency of my project's properties.

    Is there anything else I am supposed to do?
  • ar2rsawseenar2rsawseen Maintainer
    It is warning (W/System.err(955))

    so I assume Flurry wants to catch and report this error, thats why there is a misleading flurry stack trace

    The real error is:

    06-09 10:20:57.319: E/AndroidRuntime(955): java.lang.IllegalStateException: A fatal developer error has occurred. Check the logs for further information.

    06-09 10:20:57.319: E/AndroidRuntime(955): at com.google.android.gms.common.internal.zzi$zza.zzc(Unknown Source)

    can you try to remove Flurry and build app again?

  • Okay, I tried building it without any flurry plugins and I got the error. I'll open a thread for gaming interface.
Sign In or Register to comment.