AppMetricaConfig class

The class contains the starting configuration of the library. Configuration parameters are applied from the moment the library is initialized. You can set:

  • apiKey — application API key;
  • anrMonitoring - whether to capture and send reports about ANRs automatically. The default value is false.
  • anrMonitoringTimeout - the timeout in seconds at which the fact of ANR is recorded.
  • appBuildNumber - build number of application.
  • appEnvironment - application environment to be set after initialization.
  • appOpenTrackingEnabled — indicates automatic collection and sending of information about app open. The default value is true.
  • appVersion — application version;
  • crashReporting — flag for sending information about unhandled exceptions in the application. The default value is true;
  • customHosts - custom hosts for startup config.
  • dataSendingEnabled — indicates whether sending statistics is enabled. The default value is true;
  • deviceType - device type based on screen size: phone, tablet, TV.
  • dispatchPeriodSeconds - timeout for sending reports.
  • errorEnvironment — the environment of the application error in the form of a key-value pair. The environment is displayed in the crashes and errors report;
  • firstActivationAsUpdate — flag that determines if the first launch of the application is an update. The default value is false; If the first launch of the application is defined as an update, the installation will not be displayed in reports as a new installation and will not be attributed to partners;
  • location — device location information;
  • locationTracking — indicates whether the device location information is being collected and sent. The default value for Android is false, for iOS is true.
  • logs — indicates that logging of the library is enabled. The default value is false;
  • maxReportsCount - maximum buffer size for reports.
  • maxReportsInDatabaseCount — is the maximum number of events that can be stored in the database on the device before being sent to AppMetrica. The default value is 1000. Values in the range 100; 10000 are allowed. Values that do not fall within this interval will be automatically replaced with the value of the nearest interval boundary;
  • nativeCrashReporting — flag for sending information about unhandled exceptions in the application. Exceptions are caused by C++ code in Android;
  • preloadInfo — a PreloadInfo object for tracking preinstalled applications;
  • revenueAutoTrackingEnabled — indicates automatic collection and sending of information about In-App purchases. The default value is true.
  • sessionTimeout — session timeout in seconds. The default value is 10 (the minimum allowed value);
  • sessionsAutoTrackingEnabled — indicates automatic collection and sending of information about the sessions of the application user. The default value is true;
  • userProfileID — user profile ID;

Constructors

AppMetricaConfig(String apiKey, {bool? anrMonitoring, int? anrMonitoringTimeout, int? appBuildNumber, Map<String?, String?>? appEnvironment, bool? appOpenTrackingEnabled, String? appVersion, bool? crashReporting, List<String?>? customHosts, bool? dataSendingEnabled, String? deviceType, int? dispatchPeriodSeconds, Map<String?, String?>? errorEnvironment, bool? firstActivationAsUpdate, Location? location, bool? locationTracking, bool? logs, int? maxReportsCount, int? maxReportsInDatabaseCount, bool? nativeCrashReporting, PreloadInfo? preloadInfo, bool? revenueAutoTrackingEnabled, int? sessionTimeout, bool? sessionsAutoTrackingEnabled, String? userProfileID})
Creates an AppMetrica library configuration object. apiKey is a required parameter.
const

Properties

anrMonitoring bool?
final
anrMonitoringTimeout int?
final
apiKey String
final
appBuildNumber int?
final
appEnvironment Map<String?, String?>?
final
appOpenTrackingEnabled bool?
final
appVersion String?
final
crashReporting bool?
final
customHosts List<String?>?
final
dataSendingEnabled bool?
final
deviceType String?
final
dispatchPeriodSeconds int?
final
errorEnvironment Map<String?, String?>?
final
firstActivationAsUpdate bool?
final
hashCode int
The hash code for this object.
no setterinherited
location Location?
final
locationTracking bool?
final
logs bool?
final
maxReportsCount int?
final
maxReportsInDatabaseCount int?
final
nativeCrashReporting bool?
final
preloadInfo PreloadInfo?
final
revenueAutoTrackingEnabled bool?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sessionsAutoTrackingEnabled bool?
final
sessionTimeout int?
final
userProfileID String?
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Future<String>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited