Please visit our updated Documentation site at https://developer.yahoo.com/flurry
This site is deprecated. For Integration of Android Flurry SDK 5.0 please visit:
STEP 1: Basic Setup in 5 minutes
You can gain deep insight into your customer's behavior very quickly and with little effort using Flurry's Analytics service. The SDK integration process is designed to be as easy as possible with a basic setup complete in under 5 minutes.
1. Download the Flurry Android SDK
The archive should contain these files:
- FlurryAnalytics_x.y.z.jar : The library containing Flurry's analytic collection and reporting code (where x.y.x denotes the latest version of Flurry SDK).
- FlurryAds_x.y.z.jar: The optional library to incorporate Flurry's ads into your application (where x.y.x denotes the latest version of Flurry SDK).
- ProjectApiKey.txt : This file contains the name of your project and your project's API key.
- Analytics-README.pdf : This PDF file contains instructions.
2. Add the FlurryAnalytics_x.y.z.jar to your classpath
- If you're using Eclipse, modify your Java Build Path, and choose Add External JAR.
- If you're using the SDK tools directly, drop it into your libs folder and the ant task will pick it up.
3. Link Google Play service
- With the release of 4.0.0 version Flurry requires liking Google Play Services to enable Android Advertising ID required to support user's privacy choices. For more information on Android Advertising ID please follow this link
4. Configure your AndroidManifest.xml to :
- Have access to the Internet and allow Flurry SDK to check state of the network connectivity
- Specify a versionName attribute in the manifest to have data reported under that version name
- Declare min version of Android OS the application supports. Please note that Flurry supports Android OS versions 10 and above.
5. Add calls to onStartSession and onEndSession
The following three lines of the code need to be added to the each Activity of your application to accurately capture duration of users' interaction with the application.
- Insert a call to FlurryAgent.onStartSession(Context, String), passing it a reference to a Context object (such as an Activity or Service), and your project's API key. We recommend using the onStart method of each Activity in your application, and passing the Activity (or Service) itself as the Context object - passing the global Application context is not recommended.
- Insert a call to FlurryAgent.onEndSession(Context) when a session is complete. We recommend using the onStop method of each Activity in your application. Make sure to match up a call to onEndSession for each call of onStartSession, passing in the same Context object that was used to call onStartSession.
- Note: So long as there is any Context that has called onStartSession but not onEndSession, the session will be continued. If a new Context calls onStartSession within 10 seconds of the last Context calling onEndSession, then the session will be resumed, instead of a new session being created. This ensures that as a user transitions from one Activity to another in your app, that they will not have a separate session tracked for each Activity, but will have a single session that spans many activities. If you want to track specific Activity usage, we recommend Events, documented in the next section.
- If you wish to change the time window during which a session can be resumed, call FlurryAgent.setContinueSessionMillis(long milliseconds) before the first call to FlurryAgent.onStartSession.
Those few steps will give you access to the features below (see Analytics Metric Definitions for details)
- Active Users
- New Users
- Session Length
- Frequency of Use
- Page Views
- Custom User Segments
- Lifecycle Metrics
- User Retention
- Version Adoption
- Cross-App Usage
- Category Interests
- Demographic Estimates
- Time of Day Reporting
- Geographic Usage
- Language Metrics
- Firmware Versions
STEP 2: Understand user behavior through tracking Custom Events.