Class YandexMetricaConfig
public class YandexMetricaConfig
extends java.lang.Object
YandexMetricaConfig.Builder
.Nested Class Summary
Modifier and Type | Class and Description |
---|---|
static class | YandexMetricaConfig.Builder
Builds a new
YandexMetricaConfig object. |
Field Summary
Modifier and Type | Field and Description |
---|---|
java.lang.String | apiKey
Unique identifier of app in AppMetrica
|
java.lang.Boolean | appOpenTrackingEnabled
Whether app open auto tracking is enabled Default value is
YandexMetricaDefaultValues.DEFAULT_APP_OPEN_TRACKING_ENABLED . |
java.lang.String | appVersion
Application version
|
java.lang.Boolean | crashReporting
Indicates whether to capture and send reports about crashes automatically
true if we need to send reports about crashes, otherwise false |
java.util.Map<java.lang.String,java.lang.String> | errorEnvironment
Error environment to be set after initialization
|
java.lang.Boolean | firstActivationAsUpdate
Indicates, whether first activation of AppMetrica should be considered as app update or new app install.
|
android.location.Location | location
Location to be used as location for reports of AppMetrica
|
java.lang.Boolean | locationTracking
Indicates whether AppMetrica should include location information within its reports
true if allow Yandex Metrica to record location information in reports, otherwise false |
java.lang.Boolean | logs
Indicates whether AppMetrica logging enabled
true if enabled, false if not |
java.lang.Integer | maxReportsInDatabaseCount
Maximum number of reports to store in database.
|
java.lang.Boolean | nativeCrashReporting
Indicates whether to capture and send reports about native crashes automatically
true if we need to send reports about native crashes, otherwise false |
PreloadInfo | preloadInfo
Preload info for tracking preloaded apps
|
java.lang.Boolean | revenueAutoTrackingEnabled
Whether revenue auto tracking is enabled Default value is
YandexMetricaDefaultValues.DEFAULT_REVENUE_AUTO_TRACKING_ENABLED . |
java.lang.Boolean | sessionsAutoTrackingEnabled
Indicates whether sessions auto tracking is enabled.
|
java.lang.Integer | sessionTimeout
Duration of AppMetrica session
|
java.lang.Boolean | statisticsSending
Indicates whether statistics should be sent to the AppMetrica server.
|
java.lang.String | userProfileID
The ID of the user profile.
|
Constructor Summary
Modifier | Constructor and Description |
---|---|
protected | YandexMetricaConfig(YandexMetricaConfig.Builder builder) |
protected | YandexMetricaConfig(YandexMetricaConfig source) |
Method Summary
Modifier and Type | Method and Description |
---|---|
static YandexMetricaConfig.Builder | createBuilderFromConfig(YandexMetricaConfig source) |
static YandexMetricaConfig | fromJson(java.lang.String json) |
static YandexMetricaConfig.Builder | newConfigBuilder(java.lang.String apiKey)
Creates the new instance of
YandexMetricaConfig.Builder |
java.lang.String | toJson() |
Field Detail
apiKey
@NonNull public final java.lang.String apiKey
- See Also:
newConfigBuilder(String)
appVersion
@Nullable public final java.lang.String appVersion
sessionTimeout
@Nullable public final java.lang.Integer sessionTimeout
crashReporting
@Nullable public final java.lang.Boolean crashReporting
Indicates whether to capture and send reports about crashes automatically
true
if we need to send reports about crashes, otherwise false
nativeCrashReporting
@Nullable public final java.lang.Boolean nativeCrashReporting
Indicates whether to capture and send reports about native crashes automatically
true
if we need to send reports about native crashes, otherwise false
location
@Nullable public final android.location.Location location
locationTracking
@Nullable public final java.lang.Boolean locationTracking
Indicates whether AppMetrica should include location information within its reports
true
if allow Yandex Metrica to record location information in reports, otherwise false
logs
@Nullable public final java.lang.Boolean logs
Indicates whether AppMetrica logging enabled
true
if enabled, false
if not
- See Also:
YandexMetricaConfig.Builder.withLogs()
firstActivationAsUpdate
@Nullable public final java.lang.Boolean firstActivationAsUpdate
Indicates, whether first activation of AppMetrica should be considered as app update or new app install.
true
if first call of YandexMetrica.activate(android.content.Context, com.yandex.metrica.YandexMetricaConfig)
should be considered as app update, false
otherwise.
statisticsSending
@Nullable public final java.lang.Boolean statisticsSending
Indicates whether statistics should be sent to the AppMetrica server.
maxReportsInDatabaseCount
@Nullable public final java.lang.Integer maxReportsInDatabaseCount
YandexMetricaDefaultValues.DEFAULT_MAX_REPORTS_IN_DATABASE_COUNT
. Must be in range [YandexMetricaDefaultValues.DEFAULT_MAX_REPORTS_COUNT_LOWER_BOUND
; YandexMetricaDefaultValues.DEFAULT_MAX_REPORTS_COUNT_UPPER_BOUND
]. If not, closest possible value will be used.errorEnvironment
@Nullable public final java.util.Map<java.lang.String,java.lang.String> errorEnvironment
userProfileID
@Nullable public final java.lang.String userProfileID
revenueAutoTrackingEnabled
@Nullable public final java.lang.Boolean revenueAutoTrackingEnabled
YandexMetricaDefaultValues.DEFAULT_REVENUE_AUTO_TRACKING_ENABLED
.sessionsAutoTrackingEnabled
@Nullable public final java.lang.Boolean sessionsAutoTrackingEnabled
Indicates whether sessions auto tracking is enabled.
Setting this flag to true is equivalent to invokingYandexMetrica.enableActivityAutoTracking(android.app.Application)
Default value is YandexMetricaDefaultValues.DEFAULT_SESSIONS_AUTO_TRACKING_ENABLED
.appOpenTrackingEnabled
@Nullable public final java.lang.Boolean appOpenTrackingEnabled
YandexMetricaDefaultValues.DEFAULT_APP_OPEN_TRACKING_ENABLED
. Set this flag to true instead of reporting deeplinks manually from Activity.onCreate(android.os.Bundle)
via YandexMetrica.reportAppOpen(android.app.Activity)
NOTE: Auto tracking will only capture links that open activity. Those that are clicked on while activity is opened will be ignored. To track them call YandexMetrica.reportAppOpen(android.content.Intent)
from Activity.onNewIntent(android.content.Intent)
Constructor Detail
YandexMetricaConfig
protected YandexMetricaConfig(@NonNull YandexMetricaConfig.Builder builder)
YandexMetricaConfig
protected YandexMetricaConfig(@NonNull YandexMetricaConfig source)
Method Detail
newConfigBuilder
@NonNull public static YandexMetricaConfig.Builder newConfigBuilder(@NonNull java.lang.String apiKey)
YandexMetricaConfig.Builder
- Parameters:
apiKey
- API_KEY - unique identifier of app in AppMetrica.- Returns:
- builder of YandexMetricaConfig
- Throws:
java.lang.IllegalArgumentException
- ifapiKey
is null, empty or has invalid format.- See Also:
- AppMetrica SDK documentation
fromJson
public static YandexMetricaConfig fromJson(java.lang.String json)
createBuilderFromConfig
@NonNull public static YandexMetricaConfig.Builder createBuilderFromConfig(@NonNull YandexMetricaConfig source)
toJson
public java.lang.String toJson()