Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
How to use Flurry for Android plugin? I can't run it. — Gideros Forum

How to use Flurry for Android plugin? I can't run it.

romkaromka Member
edited October 2013 in General questions
First of all I had downloaded plugin http://appcodingeasy.com/Gideros-Mobile/Flurry-plugin-for-Android and registered on flurry.com. Then I ran FlurryTest.gproj through the Gideros Player on my Android device and caught the error:
main.lua is uploading.
Uploading finished.
main.lua:2: module 'flurry' not found:
	no field package.preload['flurry']
	no file './flurry.lua'
	no file '/usr/local/share/lua/5.1/flurry.lua'
	no file '/usr/local/share/lua/5.1/flurry/init.lua'
	no file '/usr/local/lib/lua/5.1/flurry.lua'
	no file '/usr/local/lib/lua/5.1/flurry/init.lua'
	no file './flurry.so'
	no file '/usr/local/lib/lua/5.1/flurry.so'
	no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
	main.lua:2: in main chunk
main.lua is uploading.
The code here is:
--require flurry
require("flurry")
 
if(flurry.isAvailable()) then
  ------
end
I tried to export project and build it to *.apk file (I've done all instructions here: http://appcodingeasy.com/Gideros-Mobile/Flurry-plugin-for-Android), but this program also didnt't run on my device.

What I did wrong?

Comments

  • amaximovamaximov Member
    edited October 2013
    Have you followed all the directions? My first guess is that you forgot to either add "System.loadLibrary("flurry");" or "com.giderosmobile.android.Flurry" to external classes. It's about a third of the way down the webpage on the appcodingeasy tutorial. Hopefully that fixes it?

    Likes: seppsepp

    +1 -1 (+1 / -0 )Share on Facebook
  • Hi, @amaximov!

    Thank you for answer.

    Have you followed all the directions?

    Yes, I think so, but I'll recheck it one more time.

    My first guess is that you forgot to either add "System.loadLibrary("flurry");" or "com.giderosmobile.android.Flurry" to external classes.

    Did I understand you correctly, that you talking about settings in Android project in Eclipse? But how to run Flurry in Gideros Player? Is it possible? Or this code works only in built *.apk file?
  • @romka flurry is mobile device only, they don't support desktop applications, thus plugin is android and ios only ;)
  • @ar2rsawseen, sorry for my newbie questions. Is it mean, that I have to comment line
    require("flurry")
    when I run application on Gideros Player and uncomment before export project?
  • You can do something like:
    if application:getDeviceInfo() == "Android" or application:getDeviceInfo() == "iOS" then
        require "flurry"
    end
    and then in your code when you want to use flurry, simply do:
    if flurry then
        flurry.logEvent(...)
    end
  • @ar2rsawseen, thank you for a help, I'll use this snippet in my code.

    But I still can't run Flurry plugin in Android project. I attached to this post two screenshots of my Android project settings. When I run this project in debug mode I catch following error messages:
    10-06 21:20:40.236: W/dalvikvm(15537): threadid=11: thread exiting with uncaught exception (group=0x40f62930)
    10-06 21:20:40.236: E/AndroidRuntime(15537): FATAL EXCEPTION: GLThread 32150
    10-06 21:20:40.236: E/AndroidRuntime(15537): java.lang.NullPointerException
    10-06 21:20:40.236: E/AndroidRuntime(15537): 	at com.giderosmobile.android.plugins.flurry.FlurryPlugin.startSession(FlurryPlugin.java:41)
    10-06 21:20:40.236: E/AndroidRuntime(15537): 	at com.giderosmobile.android.player.GiderosApplication.nativeDrawFrame(Native Method)
    10-06 21:20:40.236: E/AndroidRuntime(15537): 	at com.giderosmobile.android.player.GiderosApplication.onDrawFrame(GiderosApplication.java:490)
    10-06 21:20:40.236: E/AndroidRuntime(15537): 	at com.giderosmobile.android.GiderosRenderer.onDrawFrame(tetcolorActivity.java:248)
    10-06 21:20:40.236: E/AndroidRuntime(15537): 	at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1516)
    10-06 21:20:40.236: E/AndroidRuntime(15537): 	at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240)
    Could you please help me to understand, how to fix this errors?
    scrn.jpg
    1551 x 1036 - 188K
    scrn2.jpg
    790 x 592 - 77K
  • Just tested it with latest Flurry SDK and it seems to be ok
    You don't even need to add libraries to build path anymore, but simply copying it to the libs directory
    Here is a project for set up Gideros Player with Flurry Plugin

    zip
    zip
    FlurryTest.zip
    7M
  • @ar2rsawseen, thank you for your example. I found difference between my project and yours. I don't know why but in my project wasn't checked checkbox "FlurryAgent.jar: in tab "Order and Export" under the menu "Java build path".

    Also, I don't know why, but Lua code:
    flurry.logEvent("EventWithParameters", {key="val", anotherkey="anotherval"})
    doesn't work for me, but following lines work correctly:
    flurry.logEvent("some event 1")
    flurry.logEvent("some event 2", 'some value')
  • I have the same problem. If I pass a table as the second argument I get an invalid key to 'next' error. This suggests a problem with flurrybinder.cpp/copyParameters().
  • thats actually interesting because from code, only table should work and string value must've made error, will debug more
Sign In or Register to comment.