Flurry for Android with Enterprise not working

I can’t get Flurry to work with Android Enterprise. Writing my own plugin, I can start sessions, but none of the logEvents get through. They showup in logcat, but not actually on the flurry servers. Working with the internal ‘analytics’ package, I just get a message saying that analytics isn’t supported on this platform.

Help! Need this ASAP to launch soon. [import]uid: 122310 topic_id: 36091 reply_id: 336091[/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]

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]

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]