Class YandexMetricaConfig
public class YandexMetricaConfig
extends java.lang.Object
YandexMetricaConfig.Builder.-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classYandexMetricaConfig.BuilderBuilds a newYandexMetricaConfigobject. -
Field Summary
Fields Modifier and Type Field Description java.lang.StringapiKeyUnique identifier of app in AppMetricajava.lang.BooleanappOpenTrackingEnabledWhether app open auto tracking is enabled Default value isYandexMetricaDefaultValues.DEFAULT_APP_OPEN_TRACKING_ENABLED.java.lang.StringappVersionApplication versionjava.lang.BooleancrashReportingIndicates whether to capture and send reports about crashes automaticallyjava.util.Map<java.lang.String,java.lang.String>errorEnvironmentError environment to be set after initializationjava.lang.BooleanfirstActivationAsUpdateIndicates, whether first activation of AppMetrica should be considered as app update or new app install.android.location.LocationlocationLocation to be used as location for reports of AppMetricajava.lang.BooleanlocationTrackingIndicates whether AppMetrica should include location information within its reportsjava.lang.BooleanlogsIndicates whether AppMetrica logging enabledjava.lang.IntegermaxReportsInDatabaseCountMaximum number of reports to store in database.java.lang.BooleannativeCrashReportingIndicates whether to capture and send reports about native crashes automaticallyPreloadInfopreloadInfoPreload info for tracking preloaded appsjava.lang.BooleanrevenueAutoTrackingEnabledWhether revenue auto tracking is enabled Default value isYandexMetricaDefaultValues.DEFAULT_REVENUE_AUTO_TRACKING_ENABLED.java.lang.BooleansessionsAutoTrackingEnabledIndicates whether sessions auto tracking is enabled.java.lang.IntegersessionTimeoutDuration of AppMetrica sessionjava.lang.BooleanstatisticsSendingIndicates whether statistics should be sent to the AppMetrica server.java.lang.StringuserProfileIDThe ID of the user profile. -
Constructor Summary
Constructors Modifier Constructor Description protectedYandexMetricaConfig(YandexMetricaConfig source)protectedYandexMetricaConfig(YandexMetricaConfig.Builder builder) -
Method Summary
Modifier and Type Method Description static YandexMetricaConfig.BuildercreateBuilderFromConfig(YandexMetricaConfig source)static YandexMetricaConfigfromJson(java.lang.String json)static YandexMetricaConfig.BuildernewConfigBuilder(java.lang.String apiKey)Creates the new instance ofYandexMetricaConfig.Builderjava.lang.StringtoJson()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
apiKey
@NonNull public final java.lang.String apiKeyUnique identifier of app in AppMetrica- See Also:
newConfigBuilder(String)
-
appVersion
@Nullable public final java.lang.String appVersionApplication version -
sessionTimeout
@Nullable public final java.lang.Integer sessionTimeoutDuration of AppMetrica session -
crashReporting
@Nullable public final java.lang.Boolean crashReportingIndicates whether to capture and send reports about crashes automatically
trueif we need to send reports about crashes, otherwisefalse -
nativeCrashReporting
@Nullable public final java.lang.Boolean nativeCrashReportingIndicates whether to capture and send reports about native crashes automatically
trueif we need to send reports about native crashes, otherwisefalse -
location
@Nullable public final android.location.Location locationLocation to be used as location for reports of AppMetrica -
locationTracking
@Nullable public final java.lang.Boolean locationTrackingIndicates whether AppMetrica should include location information within its reports
trueif allow Yandex Metrica to record location information in reports, otherwisefalse -
logs
@Nullable public final java.lang.Boolean logsIndicates whether AppMetrica logging enabled
trueif enabled,falseif not- See Also:
YandexMetricaConfig.Builder.withLogs()
-
preloadInfo
Preload info for tracking preloaded apps -
firstActivationAsUpdate
@Nullable public final java.lang.Boolean firstActivationAsUpdateIndicates, whether first activation of AppMetrica should be considered as app update or new app install.
trueif first call ofYandexMetrica.activate(android.content.Context, com.yandex.metrica.YandexMetricaConfig)should be considered as app update,falseotherwise. -
statisticsSending
@Nullable public final java.lang.Boolean statisticsSendingIndicates whether statistics should be sent to the AppMetrica server.
-
maxReportsInDatabaseCount
@Nullable public final java.lang.Integer maxReportsInDatabaseCountMaximum number of reports to store in database. Default value isYandexMetricaDefaultValues.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> errorEnvironmentError environment to be set after initialization -
userProfileID
@Nullable public final java.lang.String userProfileIDThe ID of the user profile. NOTE: The string value can contain up to 200 characters. -
revenueAutoTrackingEnabled
@Nullable public final java.lang.Boolean revenueAutoTrackingEnabledWhether revenue auto tracking is enabled Default value isYandexMetricaDefaultValues.DEFAULT_REVENUE_AUTO_TRACKING_ENABLED. -
sessionsAutoTrackingEnabled
@Nullable public final java.lang.Boolean sessionsAutoTrackingEnabledIndicates whether sessions auto tracking is enabled.
Setting this flag to true is equivalent to invokingYandexMetrica.enableActivityAutoTracking(android.app.Application)Default value isYandexMetricaDefaultValues.DEFAULT_SESSIONS_AUTO_TRACKING_ENABLED. -
appOpenTrackingEnabled
@Nullable public final java.lang.Boolean appOpenTrackingEnabledWhether app open auto tracking is enabled Default value isYandexMetricaDefaultValues.DEFAULT_APP_OPEN_TRACKING_ENABLED. Set this flag to true instead of reporting deeplinks manually fromActivity.onCreate(android.os.Bundle)viaYandexMetrica.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 callYandexMetrica.reportAppOpen(android.content.Intent)fromActivity.onNewIntent(android.content.Intent)
-
-
Constructor Details
-
YandexMetricaConfig
-
YandexMetricaConfig
-
-
Method Details
-
newConfigBuilder
@NonNull public static YandexMetricaConfig.Builder newConfigBuilder(@NonNull java.lang.String apiKey)Creates the new instance ofYandexMetricaConfig.Builder- Parameters:
apiKey- API_KEY - unique identifier of app in AppMetrica.- Returns:
- builder of YandexMetricaConfig
- Throws:
java.lang.IllegalArgumentException- ifapiKeyis null, empty or has invalid format.- See Also:
- AppMetrica SDK documentation
-
fromJson
-
createBuilderFromConfig
@NonNull public static YandexMetricaConfig.Builder createBuilderFromConfig(@NonNull YandexMetricaConfig source) -
toJson
public java.lang.String toJson()
-