Appcelerator Flurry Module for iPhone/iPad and Android
That's right!! You can now use Flurry analytics in your appcelerator apps (v1.6.2).
Android module
iPhone/iPad module
Background Info
Comprehensive website analytics are essential in today's dayan age for any company aiming to be competitive. Furthermore, Soft Gravity believes the same to be true when it comes to analytics for mobile applications. For this purpose we recently reviewed and compared a series of analytics services such as Google Analytics and Flurry Analytics. We decided to further explore Flurry, due to the fact that it was developed for mobile apps and automatically captures a lot of information about the devices.
In our environment we are using Appcelerator for mobile app development because it allows us to quickly deploy for Android and iPhone. However, at the time of writing, Appcelerator only released a small Flurry module for the iPhone (not all functions are implemented). No Android module is released. So I decided to write my own module for Android, and to expand the iPhone module to full functionality.
Download
The source code is hosted at our github. If you don't want to compile the module yourself, don't worry, the module is included in there as well!!
-
For android just look for the file dist/sg.flurry-android-1.0.zip.
-
For iPhone/iPad just look for the sg.flurry-iphone-1.0.zip in the main directory.
Design decisions
The functions are designed to mimic the Flurry SDK for the respective platforms, so that developers can refer to the Flurry SDK API to figure out how to use it. Only a few function names and parameters have been changed, which you can easily determine through the documentation. Both modules use the same id of "sg.flurry" to hopefully make it more convenient for the developer to maintain.
If you attempt to add the modules for both Android and iPhone at the same time you may run into some trouble. In order to evade any potential issues make sure your modules section in your tiapp.xml looks like this:
<modules>
<module version="1.0" platform="iphone">sg.flurry</module>
<module version="1.0" platform="android">sg.flurry</module>
</modules>
Important notes for Android
-
make sure to call _onEndSession_ if you want to have events sent to Flurry
-
you will most likely need to use
_setContinueSessionMillis_and set it to a high value, so that_onEndSession_and the next_onStartSession_will be counted as the same session -
log messages are per-appended with "AndroidflurryModule"
-
if you are building the module yourself, please change the
_build.properties_file to set the correct directories -
_AndroidManifest.xml_is already configured as specified by the Flurry SDK. It is located in the file_timodule.xml_. -
clean the android build directory before you compile
Important notes for iPhone/iPad
-
you only need to call
_startSession_once :) -
log messages are per-appended with "SgFlurry"
-
clean the iphone build directory before you compile
Examples
Check out our github for the Flurry modules. I highly recommend it for any mobile app.