public final class InstallReferrer
extends java.lang.Object
The Google Install Referrer is based on information obtained from the Google Play Store about the app install. In many cases this indicates the Google Play Store thinks the install was organic but it can also include campaign data for attribution or a deferred deep link.
This information is made available to the host app for convenience purposes for dealing with deferred deep links and is typically available within a couple seconds of Tracker configuration.
Two methods of retrieving the Install Referrer exist. The legacy method using a Broadcast Receiver and the current API that uses the installreferrer library. The Kochava Tracker supports both methods with priority given to the new API with a fallback to the legacy version.
Tracker.getInstallReferrer()| Modifier and Type | Class and Description |
|---|---|
static interface |
InstallReferrer.InstallReferrerStatus
Install Referrer status messages.
|
| Modifier and Type | Field and Description |
|---|---|
int |
attemptCount
Number of attempts it took to retrieve the install referrer.
|
double |
duration
Total amount of time (seconds) across all attempts that it took to retrieve the install referrer.
|
java.lang.Boolean |
googlePlayInstant
Boolean indicating if the user has interacted with the app's instant experience in the past 7 days.
|
long |
installBeginServerTime
Unix Timestamp for when the install began server-side in seconds.
|
long |
installBeginTime
Unix Timestamp for when the install began in seconds.
|
java.lang.String |
installVersion
The app's version at the time when the app was first installed.
|
boolean |
isLegacy
Indicates that this install referrer came from the legacy Broadcast Receiver.
|
static java.lang.String |
KEY_ATTEMPT_COUNT |
static java.lang.String |
KEY_DURATION |
java.lang.String |
referrer
The install referrer.
|
long |
referrerClickServerTime
Unix Timestamp for the ad click server-time in seconds.
|
long |
referrerClickTime
Unix Timestamp for the ad click in seconds.
|
int |
status
Status of this install referrer.
|
static int |
STATUS_DEVELOPER_ERROR
An error occurred with the implementation.
|
static int |
STATUS_FEATURE_NOT_SUPPORTED
Service is not supported on this device.
|
static int |
STATUS_MISSING_DEPENDENCY
An exception indicating the required google dependency is missing from the app.
|
static int |
STATUS_NOT_GATHERED
An attempt to gather has not yet been made.
|
static int |
STATUS_OK
Install Referrer data is valid.
|
static int |
STATUS_SERVICE_DISCONNECTED
The service got disconnected while attempting to gather.
|
static int |
STATUS_SERVICE_UNAVAILABLE
Service unavailable at this moment.
|
static int |
STATUS_TIMED_OUT
A timeout occurred when attempting to gather.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isGathered()
Returns if an install referrer gather attempt has been made.
|
boolean |
isSupported()
Returns if the install referrer is supported on this device.
|
boolean |
isValid()
Returns if the referrer contained by this object is valid.
|
public static final int STATUS_SERVICE_DISCONNECTED
public static final int STATUS_OK
public static final int STATUS_SERVICE_UNAVAILABLE
public static final int STATUS_FEATURE_NOT_SUPPORTED
public static final int STATUS_DEVELOPER_ERROR
public static final int STATUS_TIMED_OUT
public static final int STATUS_MISSING_DEPENDENCY
public static final int STATUS_NOT_GATHERED
public static final java.lang.String KEY_ATTEMPT_COUNT
public static final java.lang.String KEY_DURATION
public final java.lang.String referrer
public final long installBeginTime
Will be 0 when isLegacy is true.
public final long installBeginServerTime
Will be 0 when isLegacy is true.
Note: This is only available on 2.1+ versions of the install referrer library.
public final long referrerClickTime
Will be 0 when isLegacy is true or if Google Play considers the install organic.
public final long referrerClickServerTime
Will be 0 when isLegacy is true or if Google Play considers the install organic.
Note: This is only available on 2.1+ versions of the install referrer library.
public final java.lang.Boolean googlePlayInstant
Note: This is only available on 1.1+ versions of the install referrer library.
public final java.lang.String installVersion
Note: This is only available on 2.1+ versions of the install referrer library.
public final int status
public final boolean isLegacy
A legacy install referrer will have 0 for both the installBeginTime and referrerClickTime
public final int attemptCount
public final double duration
public final boolean isValid()
public final boolean isSupported()
Note: The device is considered supported prior to an attempt being made.
public final boolean isGathered()