| Interface | Description |
|---|---|
| AttributionUpdateListener |
Tracker Attribution Update listener.
|
| ConsentStatusChangeListener |
Intelligent Consent Management Status Change Listener.
|
| DeepLinkListener |
DeepLink and Deferred DeepLink Listener.
|
| DeeplinkProcessedListener |
Deeplink processed and complete listener.
|
| TaskLocationTrackerInterface |
| Class | Description |
|---|---|
| Deeplink |
Deeplink result object.
|
| InstallReferrer |
Install Referrer.
|
| ReferralReceiver | Deprecated
As of 3.3.0, because Google has introduced a new way of retrieving the Install Referrer.
|
| Tracker |
Tracker entry point.
|
| Tracker.Configuration |
Tracker Configuration Builder.
|
| Tracker.ConsentPartner |
Intelligent Consent Management Partner Details.
|
| Tracker.Event |
Event Builder for Standard and Custom Events.
|
| Tracker.IdentityLink |
Identity Link Builder.
|
| Annotation Type | Description |
|---|---|
| InstallReferrer.InstallReferrerStatus |
Install Referrer status messages.
|
| Tracker.EventType |
Tracker Event types.
|
| Tracker.LogLevel |
Tracker Logging Levels.
|
You have the option of downloading the SDK either using Maven, or through the direct download of the AAR file.
Add the Kochava Maven repository to your root-level build.gradle file.
allprojects {
// ...
repositories {
// ...
maven {url "http://kochava.bintray.com/maven"}
}
}
Add the Kochava SDK to your module level build.gradle file. Replace "x.y.z" with the version obtained from the Download Badge above.
dependencies {
// ...
compile 'com.kochava.base:Tracker:x.y.z'
}
Download the AAR file from the Download Badge above and either add it directly or extract the JAR file and other resources from it and add them individually.
Dependencies are added alongside the Kochava SDK in your module level build.gradle file.
dependencies {
//Required: Google Play Services Base (If publishing to the Google Play Store)
compile 'com.google.android.gms:play-services-base:11.6.0'
//Required: Install Referrer (If publishing to the Google Play Store)
compile 'com.android.installreferrer:installreferrer:1.0'
//Optional: Location Collection. Note: This feature must also be enabled server side before collection will occur.
compile 'com.google.android.gms:play-services-location:11.6.0'
//Optional: Instant App Status Collection
compile 'com.google.android.instantapps:instantapps:1.1.0'
}
Permissions are added to the top level of the AndroidManifest.xml file. Required and Recommended permissions are automatically added when using the AAR. If a recommended permission is unwanted it can be removed using the tools:node="remove" manifest merge feature.
Note Ensure you are compliant with the terms and requirements of the publishing app store regarding sensitive permissions such as GET_ACCOUNTS.
//Required:
<uses-permission android:name="android.permission.INTERNET" />
//Recommended: Wifi and Network state Collection
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
//Optional: Paired and Connected Bluetooth Device Collection
<uses-permission android:name="android.permission.BLUETOOTH"/>
//Optional: Location Collection. Note: This feature must also be enabled server side before collection will occur.
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
//Optional: Email Collection. Note: This feature must also be enabled on the Kochava dashboard before collection will occur.
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
The Kochava Tracker features an AAR included broadcast receiver that listens for the INSTALL_REFERRER broadcast action.
If the Kochava Tracker broadcast receiver is the only receiver for that action in your app no further action is required.
Otherwise refer to the ReferralReceiver reference for advanced configuration instructions.
Tracker.Configuration object,
and then perform the configuration using the configuration method Tracker.configure(com.kochava.base.Tracker.Configuration).
It is recommended that you call this in your Application.onCreate method.
Note If you are doing an advanced configuration such as in a multiple process app then read the advanced usage section in
Tracker.Configuration.
import android.app.Application;
import com.kochava.base.Tracker;
import com.kochava.base.Tracker.Configuration;
public class MyApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
Tracker.configure(new Configuration(getApplicationContext())
.setAppGuid("_YOUR_KOCHAVA_APP_GUID_")
.setLogLevel(Tracker.LOG_LEVEL_INFO)
);
}
}
More than basic analytics, the events you send to Kochava are associated with your install attribution data,
so that you can understand how the users who came to you through a particular ad went on to use the various features within your app.
For more information, refer to Tracker.Event.
Tracker.sendEvent(new Event(Tracker.EVENT_TYPE_PURCHASE)
.setName("Gold Token")
.setPrice(1.99)
.setCurrency("USD")
);
Tracker.setIdentityLink(com.kochava.base.Tracker.IdentityLink).
Tracker.getAttribution().
Tracker.getDeviceId().
Tracker.LogLevel.
Tracker.Configuration.setIntelligentConsentManagement(boolean).
Tracker Tracker entry point.
Tracker.Configuration Tracker Configuration Builder.
Tracker.Event Event Builder.
Tracker.IdentityLink Identity Link Builder.
Tracker.EventType Tracker Event types.
Tracker.LogLevel Tracker Logging Levels.
AttributionUpdateListener Tracker Attribution Update Listener.
ReferralReceiver Install Referrer Receiver.
InstallReferrer Install Referrer.
InstallReferrer.InstallReferrerStatus Install Referrer status messages.
ConsentStatusChangeListener Intelligent Consent Management Status Change Listener.
Tracker.ConsentPartner Intelligent Consent Management Partner Details.
DeepLinkListener DeepLink and Deferred DeepLink Listener.