YandexMetricaConfig class

com.yandex.metrica

public class YandexMetricaConfig

This class contains the extended startup configuration for the library.

The parameters of the extended configuration are applied from the time of library initialization. The extended configuration is necessary if you want to track pre-installed apps.

Nested classes

Methods

YandexMetricaConfig.BuildernewConfigBuilder(@NonNull String apiKey)

Creates the com.yandex.metrica.YandexMetricaConfig.Builder instance — a constructor for the extended configuration of the AppMetrica library.

Fields

StringapiKey

The API key of the application.

StringappVersion

App version.

BooleancrashReporting

The flag indicating that sending app crashes is enabled.

BooleanfirstActivationAsUpdate

The flag indicating that the first launch of the app is an update (not an installation).

BooleaninstalledAppCollecting

The flag indicating that sending information about apps installed on the user's device is enabled.

Locationlocation

Information about the location of the device.

BooleanlocationTracking

A flag indicating if sending information about the device location is enabled.

Booleanlogs

The flag indicating that the logging of the library is enabled.

BooleannativeCrashReporting

The flag indicating that sending native app crashes is enabled.

PreloadInfopreloadInfo

The instance of the PreloadInfo class.

IntegersessionTimeout

Session timeout in seconds.

BooleanstatisticsSending

A flag indicating that sending statistics is enabled.

Field descriptions

apiKey

public final String apiKey

The API key of the application.

appVersion

public final String appVersion

App version.

crashReporting

public final Boolean crashReporting

The flag indicating that sending app crashes is enabled.

The default value is true.

Possible values:
  • true — Sending information about crashes is enabled.
  • false — Sending information about crashes is disabled.

firstActivationAsUpdate

public final Boolean firstActivationAsUpdate

The flag indicating that the first launch of the app is an update (not an installation).

The default value is false.

Possible values:
  • true — The first launch is defined as an update.
  • false — The first launch is defined as a new installation.

installedAppCollecting

public final Boolean installedAppCollecting

The flag indicating that sending information about apps installed on the user's device is enabled.

The default value is false.

Possible values:
  • true — Sending information about installed apps is enabled.
  • false — Sending information about installed apps is disabled.

location

public final Location location

Information about the location of the device.

locationTracking

public final Boolean locationTracking

A flag indicating if sending information about the device location is enabled.

The default value is true.

Possible values:
  • true — Sending information about the device location is enabled.
  • false — Sending information about the location of the device is disabled.

logs

public final Boolean logs

The flag indicating that the logging of the library is enabled.

The default value is false.

Possible values:
  • true — Library logging is enabled.
  • false — Library logging is disabled.

nativeCrashReporting

public final Boolean nativeCrashReporting

The flag indicating that sending native app crashes is enabled.

The default value is true.

Possible values:
  • true — Sending information about native crashes is enabled.
  • false — Sending information about native crashes is disabled.

preloadInfo

public final PreloadInfo preloadInfo

The instance of the PreloadInfo class.

sessionTimeout

public final Integer sessionTimeout

Session timeout in seconds.

The default value is 10 (minimum allowed value).

statisticsSending

public final Boolean statisticsSending

A flag indicating that sending statistics is enabled.

The default value is true.

Possible values:
  • true — Sending statistics is enabled.
  • false — Sending statistics is disabled.