Flurry for Android with Enterprise not working

Awesome, Thank you so much for your responses Joshua. Its so helpful to know that someone at corona is listening and bouncing ideas so we can narrow it down. Working together knowing someone is listening/caring really matters to us developers! :slight_smile:

Anyway, I tried your suggestion and it worked, so I went through and found out the issue (I believe, we’ll have to wait a couple hours for flurry to update and see what events made it through). Here was the problem.

I had this:

local analytics_logEvent = analytics.logEvent

and then down below:

analytics_logEvent(“MyEvent”)

So what I believe was happening is that there is a default implementation of analytics.logEvent that gives the unsupported warning, until you make a successful analytics.init and then the variable changes to a different implementation. Since I was using the cached version, it wasn’t getting the logged in version, so I just changed my analytics_logEvent to analytics.logEvent and stuff started working (or at least not reporting errors)

Are flurry event parameters going to work with the flurry api build into 1031? thats why I originally built my own flurry support for ios, but I believe they are supported there now. If event parameters work with the analytics.logEvent api we are going to be good to go! (assuming I see my stuff show up later tonight) [import]uid: 122310 topic_id: 36091 reply_id: 143366[/import]

I’m glad you got it working!

I’m not the Flurry expert here. But I do know that our Flurry API does support logging a table/dictionary of parameters as a 2nd argument as described here…
http://docs.coronalabs.com/api/library/analytics/logEvent.html

Is this what you are looking for?
Or are we missing a new feature that Flurry provides?
[import]uid: 32256 topic_id: 36091 reply_id: 143376[/import]

thats the feature I’m talking about…i wasn’t sure if it works in Android or not. OK, I’ll report back tomorrow after the Flurry logs clear and see if this all worked!

Thanks again for all your help. [import]uid: 122310 topic_id: 36091 reply_id: 143379[/import]

yes! This all works now. Thank you so much for helping me debug the issue. Event parameters work too. [import]uid: 122310 topic_id: 36091 reply_id: 143380[/import]

Great! Happy to help! :slight_smile: [import]uid: 32256 topic_id: 36091 reply_id: 143385[/import]

3rd party libraries such as Flurry, Facebook, inneractive, and InMobi are not included with the Corona Android library. This is by design, because Corona developers want the ability to exclude features that their app doesn’t use to keep the app size down.

To include the Flurry library, you need to add its “FlurryAgent.jar” file to your Android app project’s “libs” directory. Please see sample project “Samples/IncludeAllFeatures/android” for an example on how to do this. That project also shows an example on how to include other 3rd party libraries as well.

Also note that we include a copy of the “FlurryAgent.jar” file with Corona Enterprise under the following directory. You’ll want to use this JAR file because that is the specific version that Corona was compiled with.
./CoronaEnterprise/Corona/android/lib/Flurry
[import]uid: 32256 topic_id: 36091 reply_id: 143353[/import]

Hi Joshua,

When I follow your instructions, I get

Output string :: WARNING: The ‘analytics’ library is not available on this platform.

everytime I try to do analytics.logEvent

I’m using your FlurryAgent.jar, and doing require ‘analytics’, and using build 2013.1031 [import]uid: 122310 topic_id: 36091 reply_id: 143356[/import]

I just compiled the “IncludeAllFeatures” sample using build 1031 and it worked for me. I was able to successfully load the Flurry library and use it.

Have you tried building the “IncludeAllFeatures” sample project as is?
That is, without making any changes to it?
This will help you isolate the issue, verifying that you can get the sample project to worked before trying to make it work with your project.

If you are able to successfully build the sample project, then that tells us it’s a configuration issue in your app project. Are you referencing the “Corona” library directory in your “project.properties” file like how it is shown in the sample projects? It’s important that you do it that way because it’ll make the Android build system pickup all of Corona’s required libraries in its library project directory. [import]uid: 32256 topic_id: 36091 reply_id: 143361[/import]

Awesome, Thank you so much for your responses Joshua. Its so helpful to know that someone at corona is listening and bouncing ideas so we can narrow it down. Working together knowing someone is listening/caring really matters to us developers! :slight_smile:

Anyway, I tried your suggestion and it worked, so I went through and found out the issue (I believe, we’ll have to wait a couple hours for flurry to update and see what events made it through). Here was the problem.

I had this:

local analytics_logEvent = analytics.logEvent

and then down below:

analytics_logEvent(“MyEvent”)

So what I believe was happening is that there is a default implementation of analytics.logEvent that gives the unsupported warning, until you make a successful analytics.init and then the variable changes to a different implementation. Since I was using the cached version, it wasn’t getting the logged in version, so I just changed my analytics_logEvent to analytics.logEvent and stuff started working (or at least not reporting errors)

Are flurry event parameters going to work with the flurry api build into 1031? thats why I originally built my own flurry support for ios, but I believe they are supported there now. If event parameters work with the analytics.logEvent api we are going to be good to go! (assuming I see my stuff show up later tonight) [import]uid: 122310 topic_id: 36091 reply_id: 143366[/import]

I’m glad you got it working!

I’m not the Flurry expert here. But I do know that our Flurry API does support logging a table/dictionary of parameters as a 2nd argument as described here…
http://docs.coronalabs.com/api/library/analytics/logEvent.html

Is this what you are looking for?
Or are we missing a new feature that Flurry provides?
[import]uid: 32256 topic_id: 36091 reply_id: 143376[/import]

thats the feature I’m talking about…i wasn’t sure if it works in Android or not. OK, I’ll report back tomorrow after the Flurry logs clear and see if this all worked!

Thanks again for all your help. [import]uid: 122310 topic_id: 36091 reply_id: 143379[/import]

yes! This all works now. Thank you so much for helping me debug the issue. Event parameters work too. [import]uid: 122310 topic_id: 36091 reply_id: 143380[/import]

Great! Happy to help! :slight_smile: [import]uid: 32256 topic_id: 36091 reply_id: 143385[/import]

I know this is an old topic, but I just wanted to confirm something about the Flurry plugin.

If I download the latest Enterprise plugins folder, I can see that analytics-flurry folder contains 2 jar files:

CoronaProvider.analytics.flurry.jar FlurryAnalytics-4.1.0.jar

However if I go into /Applications/CoronaEnterprise/Samples/IncludeAllFeatures/android/libs/ I can see another Flurry jar file:

FlurryAgent.jar

If I’m building an Android Enterprise project and want to use Flurry, do I just need to include the 2 jars from the plugins folder, or do I also need the FlurryAgent.jar file? It seems like Flurry is working for me without adding the FlurryAgent file, but I’m just thinking that perhaps there is some functionality that I miss out on by not putting it in my libs folder.

@Alan

You only need the 2 files from the EnterprisePlugins folder. Those are the ones I’m using.

I assume the other one in the samples folder is some old junk that hasn’t been updated to the newer files.

I know this is an old topic, but I just wanted to confirm something about the Flurry plugin.

If I download the latest Enterprise plugins folder, I can see that analytics-flurry folder contains 2 jar files:

CoronaProvider.analytics.flurry.jar FlurryAnalytics-4.1.0.jar

However if I go into /Applications/CoronaEnterprise/Samples/IncludeAllFeatures/android/libs/ I can see another Flurry jar file:

FlurryAgent.jar

If I’m building an Android Enterprise project and want to use Flurry, do I just need to include the 2 jars from the plugins folder, or do I also need the FlurryAgent.jar file? It seems like Flurry is working for me without adding the FlurryAgent file, but I’m just thinking that perhaps there is some functionality that I miss out on by not putting it in my libs folder.

@Alan

You only need the 2 files from the EnterprisePlugins folder. Those are the ones I’m using.

I assume the other one in the samples folder is some old junk that hasn’t been updated to the newer files.