public class YandexMetricaConfig
extends java.lang.Object
Contains configuration of analytic processing. Configuration created by YandexMetricaConfig.Builder.

Nested Class Summary

Nested Classes
Modifier and TypeClass and Description
static class YandexMetricaConfig.Builder
Builds a new YandexMetricaConfig object.

Field Summary

Fields
Modifier and TypeField and Description
java.lang.StringapiKey
Unique identifier of app in AppMetrica
java.lang.BooleanappOpenTrackingEnabled
Whether app open auto tracking is enabled Default value is YandexMetricaDefaultValues.DEFAULT_APP_OPEN_TRACKING_ENABLED.
java.lang.StringappVersion
Application version
java.lang.BooleancrashReporting
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.BooleanfirstActivationAsUpdate
Indicates, whether first activation of AppMetrica should be considered as app update or new app install.
android.location.Locationlocation
Location to be used as location for reports of AppMetrica
java.lang.BooleanlocationTracking
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.Booleanlogs
Indicates whether AppMetrica logging enabled true if enabled, false if not
java.lang.IntegermaxReportsInDatabaseCount
Maximum number of reports to store in database.
java.lang.BooleannativeCrashReporting
Indicates whether to capture and send reports about native crashes automatically true if we need to send reports about native crashes, otherwise false
PreloadInfopreloadInfo
Preload info for tracking preloaded apps
java.lang.BooleanrevenueAutoTrackingEnabled
Whether revenue auto tracking is enabled Default value is YandexMetricaDefaultValues.DEFAULT_REVENUE_AUTO_TRACKING_ENABLED.
java.lang.BooleansessionsAutoTrackingEnabled
Indicates whether sessions auto tracking is enabled.
java.lang.IntegersessionTimeout
Duration of AppMetrica session
java.lang.BooleanstatisticsSending
Indicates whether statistics should be sent to the AppMetrica server.
java.lang.StringuserProfileID
The ID of the user profile.

Constructor Summary

Constructors
ModifierConstructor and Description
protected YandexMetricaConfig(YandexMetricaConfig.Builder builder) 
protected YandexMetricaConfig(YandexMetricaConfig source) 

Method Summary

All Methods
Static Methods
Instance Methods
Concrete Methods
Modifier and TypeMethod and Description
static YandexMetricaConfig.BuildercreateBuilderFromConfig(YandexMetricaConfig source) 
static YandexMetricaConfigfromJson(java.lang.String json) 
static YandexMetricaConfig.BuildernewConfigBuilder(java.lang.String apiKey)
Creates the new instance of YandexMetricaConfig.Builder
java.lang.StringtoJson() 

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

apiKey

@NonNull
public final java.lang.String apiKey
Unique identifier of app in AppMetrica
See Also:
newConfigBuilder(String)

appVersion

@Nullable
public final java.lang.String appVersion
Application version
See Also:
YandexMetricaConfig.Builder.withAppVersion(String)

sessionTimeout

@Nullable
public final java.lang.Integer sessionTimeout
Duration of AppMetrica session
See Also:
YandexMetricaConfig.Builder.withSessionTimeout(int)

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

See Also:
YandexMetricaConfig.Builder.withCrashReporting(boolean)

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

See Also:
YandexMetricaConfig.Builder.withNativeCrashReporting(boolean)

location

@Nullable
public final android.location.Location location
Location to be used as location for reports of AppMetrica
See Also:
YandexMetricaConfig.Builder.withLocation(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

See Also:
YandexMetricaConfig.Builder.withLocationTracking(boolean)

logs

@Nullable
public final java.lang.Boolean logs

Indicates whether AppMetrica logging enabled

true if enabled, false if not

See Also:
YandexMetricaConfig.Builder.withLogs()

preloadInfo

@Nullable
public final PreloadInfo preloadInfo
Preload info for tracking preloaded apps
See Also:
YandexMetricaConfig.Builder.withPreloadInfo(PreloadInfo)

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
Maximum number of reports to store in database. Default value is 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.
See Also:
YandexMetricaConfig.Builder.withMaxReportsInDatabaseCount(int)

errorEnvironment

@Nullable
public final java.util.Map<java.lang.String,java.lang.String> errorEnvironment
Error environment to be set after initialization
See Also:
YandexMetricaConfig.Builder.withErrorEnvironmentValue(String, String)

userProfileID

@Nullable
public final java.lang.String userProfileID
The ID of the user profile. NOTE: The string value can contain up to 200 characters.
See Also:
YandexMetricaConfig.Builder.withUserProfileID(String)

revenueAutoTrackingEnabled

@Nullable
public final java.lang.Boolean revenueAutoTrackingEnabled
Whether revenue auto tracking is enabled Default value is YandexMetricaDefaultValues.DEFAULT_REVENUE_AUTO_TRACKING_ENABLED.
See Also:
YandexMetricaConfig.Builder.withRevenueAutoTrackingEnabled(boolean)

sessionsAutoTrackingEnabled

@Nullable
public final java.lang.Boolean sessionsAutoTrackingEnabled

Indicates whether sessions auto tracking is enabled.

Setting this flag to true is equivalent to invoking YandexMetrica.enableActivityAutoTracking(android.app.Application) Default value is YandexMetricaDefaultValues.DEFAULT_SESSIONS_AUTO_TRACKING_ENABLED.

appOpenTrackingEnabled

@Nullable
public final java.lang.Boolean appOpenTrackingEnabled
Whether app open auto tracking is enabled Default value is 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)
See Also:
YandexMetricaConfig.Builder.withAppOpenTrackingEnabled(boolean)

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)
Creates the new instance of YandexMetricaConfig.Builder
Parameters:
apiKey - API_KEY - unique identifier of app in AppMetrica.
Returns:
builder of YandexMetricaConfig
Throws:
java.lang.IllegalArgumentException - if apiKey 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()