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?)
Comments
http://appcodingeasy.com/Gideros-Mobile/Flurry-plugin-for-Android
http://giderosmobile.com/forum/discussion/comment/34167#Comment_34167
Likes: hgvyas123, zoolax
Your replies made things look even worse, not better O.o
Manual is the same as ios, only installation differs, basically copying the files and including external class in main activity (as all android plugins)
But I guess I can figure something out.
You should still fix the manual though.
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).
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
Likes: SinisterSoft, duke2017, seppsepp
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
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
https://deluxepixel.com
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.
https://deluxepixel.com
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
https://deluxepixel.com
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)
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...)
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).
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.
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...)
If you still have this problem, ping me and I will do more thorough testing
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
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!
just updated, try this version:
https://github.com/gideros/gideros/blob/master/plugins/flurry/source/Android/src/com/giderosmobile/android/plugins/flurry/GFlurry.java
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
Have you set them up correctly?
Is there anything else I am supposed to do?
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?