This RoboPod requires you to download and add the native 3rd party library manually:
- Download the SDK for iOS from https://dev.flurry.com
- Put the
libFlurry_X.X.X.a
file in your iOS project'slibs/
folder - Add the following to your
robovm.xml
<config>
...
<libs>
<lib>libs/libFlurry_X.X.X.a</lib>
</libs>
</config>
Change X.X.X
with the version number of the library.
Add the following dependency to your build.gradle
:
dependencies {
... other dependencies ...
compile "org.robovm:robopods-flurry-ios-analytics:$robopodsVersion"
}
Add the following dependency to your pom.xml
:
<dependency>
<groupId>org.robovm</groupId>
<artifactId>robopods-flurry-ios-analytics</artifactId>
<version>${robopods.version}</version>
</dependency>
Before you can track any events, you have to setup the SDK.
Add the following code to your application's entry point, typically didFinishLaunching()
in your app delegate.
Flurry.startSession("API_KEY");
Change the API_KEY
with your key that you can find in your Flurry dashboard.
When setting up Flurry it's very helpful to get logs.
Add the following code before starting Flurry:
Flurry.setDebugLogEnabled(true);
Flurry.setLogLevel(FlurryLogLevel.All); // Adjust level to your needs.
...
Flurry.startSession("API_KEY");
Note: Don't forget to disable debug logging when you release your app!
To enable crash reporting add the following code before starting Flurry:
Flurry.enableCrashReporting();
...
Flurry.startSession("API_KEY");
Note: You can only have one (1!) crash reporting service in your app! If you use multiple crash reporters no crashes will be reported!
- Make sure you have setup an app in your Flurry dashboard
and specified the correct
API_KEY
. - Check your logs for any errors, like network failures.
Gather analytics data for your app by tracking custom events.
Add the following code to track your event:
Flurry.logEvent("Event Name");
You can also specify up to 10 additional parameters:
Map<String, String> params = new HashMap<>();
params.put("some_parameter", "value");
Flurry.logEvent("Event Name", params);
You can also track the duration for an event:
// Start the timed event.
Flurry.logEvent("Timed Event", true);
...
// Later, end the timed event.
Flurry.endTimedEvent("Timed Event");
Run your app and trigger some event tracking code. If you enabled debug logging, you should see logs confirming your event tracking.