Support Home > SDK Integration > SDK – KochavaTracker Android

SDK – KochavaTracker Android

SDK

KochavaTracker Android


The KochavaTracker Android SDK allows advertisers to integrate a single SDK to leverage the hundreds of ad network and publisher partners integrated with Kochava. This limits the number of 3rd party SDKs required to run a successful UA strategy and greatly reduces complexity during update cycles.

 

Minimum Requirements:

Additional permissions or dependencies may be required for recommended or optional features. See the following steps for details.

  • Android API 9 (Recommended API 14)
  • Internet Permission
  • Google Play Services Base (if publishing on the Google Play Store)

SDK Integration

For the latest version of the Android SDK, refer to the Kochava SDK repository.

 

NOTE: A migration guide is provided for users of the Kochava Tracker Android SDK released prior to 3.0.0. For more information, refer to our Android Migration Guide.

 

  1. Add the Dependencies
    The KochavaTracker SDK is available through Maven as well as through direct download. If using the direct download option you must handle importing the AAR manually based on the requirements of your development environment.

    Update your project build.gradle repositories block to add the Kochava maven repository.

    Add the following dependencies to your module level build.gradle file. Google Play Services Setup, retrieve the current version of the Tracker SDK from Maven and replace “x.y.z” below with it.

  2.  

  3. Add Permissions
    Add the permissions to the AndroidManifest.xml file. Detailed documentation can be found here. Required and Recommended permissions are automatically added when using the AAR.

    Ensure you are familiar with the terms and requirements of the publishing store regarding sensitive permissions.

  4.  

  5. Add the Broadcast Receiver
    The KochavaTracker features a broadcast receiver that listens for the INSTALL_REFERRER broadcast. This must be added to the AndroidManifest.xml file within the Application block.

    Only a single broadcast receiver for the INSTALL_REFERRER action can be used in the AndroidManifest.xml file. If you have multiple you will need to create a forwarding broadcast receiver that sends the Intent to all the others.

     

    Example –

     


Using the SDK

Once an SDK has been integrated into your project, it’s time to make use of the included classes and resources.

 

Initialization and Configuration:

By initializing and configuring a KochavaTracker, you are completing the basic integration with a KochavaTracker SDK. This should be done in the logic of your application where things first start up, such as in your Application onCreate method.

In the sample code below make sure you replace “_YOUR_APP_GUID_” with your apps App Guid from the Kochava dashboard. For more information refer to our Locating an App Guid support documentation.

 

Events:

The KochavaTracker Event class provides a means of defining the parameters for a post-install event, providing standardized types and key names.

 

Example –


References

Package com.kochava.base Android Tracker Integration Guide
AttributionListener Attribution result listener.
ReferralReceiver Google Play Install Referrer Receiver.
Tracker Tracker entry point
Tracker.Configuration Tracker Configuration Object Builder.
Tracker.Event Event Object Builder for Standard and Custom Events.
Tracker.IdentityLink Identity Link Object Builder.
Tracker.EventType Tracker Event types.
Tracker.LogLevel Tracker Logging Levels.

 
 

Last Modified: Sep 18, 2017 at 10:39 am