Manual Flurry Android SDK Integration

If you are looking to install the Flurry SDK via Maven Central follow the instructions for Install via Maven Central.

Install Flurry SDK .aar files

If you are looking to directly download the Flurry SDK packaged in .aar files, follow these steps:

  1. Download .aar files from Flurry Dev Portal

android sdk download

The downloaded archive should contain these files for use with Flurry Analytics:

  • flurryAnalytics-x.y.z.aar: The library containing the Flurry analytic collection and reporting code.

  • flurryAds-x.y.z.aar: The optional library to incorporate Flurry ads into your application.

  1. Add .aar files to your project. This can be performed using Android Studio or Eclipse.

Using Android Studio:

  1. Add flurryAnalytics-x.y.z.aar to your project’s libs folder.

  2. If you also want to integrate Flurry Advertising, add the flurryAds-x.y.x.aar to your project’s libs folder.

  3. Navigate to File > Project Structure > Module > Dependencies. Click the ‘+’ button in the bottom of the ‘Project Structure’ popup to add dependencies. Select ‘File dependency’ and add libs/flurryAnalytics-x.y.z.aar.

  4. Add Google Play Services library. If selectively compiling individual Google Play Service APIs, you should include the Google Analytics API.

Using Eclipse

  1. Add flurryAnalytics-x.y.z.aar to your project’s libs folder. Right-click on each AAR file and select Build Path > Add to Build Path.

  2. If you also want to integrate Flurry Advertising, add the flurryAds-x.y.z.aar to your project’s libs folder.

  3. Right-click on each AAR file and select Build Path > Add to Build Path.

  4. Add the Google Play Service library aar file.

Important

As of Flurry SDK 12.0.0, the Flurry SDK is provided in the AAR format, we no longer provide .jar files.

Note

If you are adding the AAR format of the Flurry dependencies, you do not need to modify your AndroidManifest files or ProGuard configuration.

Configure the AndroidManifest and ProGuard Files

Below is an example of an AndroidManifest.xml file configured for both Flurry Analytics and Flurry Advertising.

Required Permission

Required to send analytics data back to the flurry servers

android.permission.INTERNET

If your application has network state permissions, transmission of analytics data can be optimized and the SDK can use the device’s external memory for pre-caching

android.permission.ACCESS_NETWORK_STATE
android.permission.WRITE_EXTERNAL_STORAGE

Location Permission

Flurry Analytics will use PASSIVE_PROVIDER to get the location information. Otherwise it will use the NETWORK_PROVIDER to fetch the last known location.

Without these permissions, only country level location information will be available.

You may call FlurryAgent.setLocation() to set the location manually if your app uses the GPS.

To disable detailed location reporting even when your app has permission, call FlurryAgent.setReportLocation(false) before calling FlurryAgent.onStartSession()

android.permission.ACCESS_COARSE_LOCATION or
android.permission.ACCESS_FINE_LOCATION

If your application has location android.permission.ACCESS_FINE_LOCATION permission, analytics will use PASSIVE_PROVIDER to get the location information. Otherwise it will use the NETWORK_PROVIDER to fetch the last known location.

Without these permissions, only country level location information will be available.

You may call FlurryAgent.setLocation() to set the location manually if your app uses the GPS. To disable detailed location reporting even when your app has permission, call FlurryAgent.setReportLocation(false) before calling FlurryAgent.onStartSession().

Specify a versionName attribute in the manifest to have data reported under that version name.

Application

If you are shipping an app, extend the Application class if you are not already doing so:

application
  android:name=".MyApplication">
  …
</application>

Configure Your Proguard.cfg File (Optional)

The following step is only necessary if you are using Proguard to obfuscate your code.

Add the following instructions to your proguard.cfg file: