Unity Flurry Plugin

Description

This package contains:

Prerequisite

You need a Flurry account with one application defined. Each Flurry Application has one unique API key. This key is mandatory to use this plugin.

Installation

ioPixel provides a standard Unity package. To install it in your Unity project, two solutions:

For convenience, an example scene is included in the package.

Configuration

By default, the Flurry plugin is not active. To start the plugin, first call:

If you use Android, you must add the following line in the OnApplicationQuit(): EMFlurry.endSession()

Specific for Android

Setup your AndroidManifest.xml. Flurry needs INTERNET permissions. You can add ACCESS_COARSE_LOCATION and ACCESS_FINE_LOCATION if you want track users locations.

A modified AndroidManifestFlurrytemplate.xml can be used if you don't have yours. Just copy AndroidManifestFlurryTemplate.xml into AndroidManifest.xml

If you have your own AndroidManifest.xml, add these lines if needed:

<uses-permission android:name="android.permission.INTERNET" />
<!-- optional permission for Flurry -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

Full API Specification

// Starts Flurry session and set the used apiKey
void startSession(string apiKey)

// Log an event with eventName, isTimed=true if you need to time the event
void logEvent(string eventName, bool isTimed)

// Log an event with eventName and parameters, isTimed=true if you need to time the event
void logEvent(string eventName, Dictionary<string,string> parameters, bool isTimed)

// End a timed event
void endTimedEvent(string eventName)

// Log a page view
void logPageView()

// Log an error
void logError(string errorId, string message, string errorClass)

// Set your user userId if your application supports it (ie. player name for a game)
void setUserID(string userId)

// Set the user age if your application supports it
void setAge(int age)

// Set the user gender if your application supports it (true=female, false=male)
void setGender(bool female)

// Change the default session reporting request from HTTP to HTTPS
void setUseHttps(bool useHttps)

// Enable debug logs
void setLogEnabled(bool logEnabled)

// Ends the started Flurry session.  This method must be called when the application finish
// NOTE: Only on Android
void endSession()

// If you wish to change the window during which a session can be resumed,
// setContinueSessionMillis(long milliseconds) before the first call to startSession.
// NOTE: Only on Android
void setContinueSessionMillis(long milliseconds)

// setter for reports session on application close ("true" recommanded)
// NOTE: Only on iOS
void setSessionReportsOnCloseEnabled(bool isOnCloseEnabled)

// setter for reports session on application pause
// NOTE: Only on iOS
void setSessionReportsOnPauseEnabled(bool isOnPauseEnabled)
// Starts Flurry session and set the used apiKey
void startSession(string apiKey) 

// Log an event with eventName, isTimed=true if you need to time the event
void logEvent(string eventName, bool isTimed) 

// Log an event with eventName and parameters, isTimed=true if you need to time the event
void logEvent(string eventName, Dictionary<string,string> parameters, bool isTimed) 

// End a timed event
void endTimedEvent(string eventName) 

// Log a page viewed
void logPageView() 

// Log an error
void logError(string errorId, string message, string errorClass) 

// Set your user userId if your application supports it (ie. player name for a game)
void setUserID(string userId) 

// Set the user age if your application supports it
void setAge(int age) 

// Set the user gender if your application supports it (true=female, false=male)
void setGender(bool female) 

// Change the default session reporting request from HTTP to HTTPS
void setUseHttps(bool useHttps) 

// Enable debug logs
void setLogEnabled(bool logEnabled) 

// Ends the started Flurry session.  This method must be called when the application finish
// NOTE: Only on Android
void endSession() 

// If you wish to change the window during which a session can be resumed,
// setContinueSessionMillis(long milliseconds) before the first call to startSession.
// NOTE: Only on Android
void setContinueSessionMillis(long milliseconds) 

// setter for reports session on application close ("true" recommanded)
// NOTE: Only on iOS
void setSessionReportsOnCloseEnabled(bool isOnCloseEnabled) 

// setter for reports session on application pause
// NOTE: Only on iOS
void setSessionReportsOnPauseEnabled(bool isOnPauseEnabled)