设置 config 方法

logLevel

指定要从 Adjust SDK 接收的日志级别

AdjustLogLevel? logLevel;
Dart
AdjustConfig adjustConfig = new AdjustConfig('{YourAppToken}', AdjustEnvironment.Sandbox);
//...
adjustConfig.logLevel = AdjustLogLevel.verbose;
//...
Adjust.start(adjustConfig);

AdjustLogLevel Enum

defaultTracker

定义默认跟踪码。Adjust 会将自然安装分配到该跟踪码。

String? defaultTracker;
Dart
AdjustConfig adjustConfig = new AdjustConfig('{YourAppToken}', AdjustEnvironment.Sandbox);
//...
adjustConfig.defaultTracker= '{TrackerToken}';
//...
Adjust.start(adjustConfig);

externalDeviceId

指定在报告中使用的外部设备 ID

String? externalDeviceId;
Dart
AdjustConfig adjustConfig = new AdjustConfig('{YourAppToken}', AdjustEnvironment.Sandbox, true);
//...
adjustConfig.externalDeviceId= '{Your-External-Device-Id}';
//...
Adjust.start(adjustConfig);

launchDeferredDeeplink

允许或禁止 SDK 启动延迟深度链接。如 允许​ ,SDK 会启动与用户交互的延迟深度链接。

bool? launchDeferredDeeplink;
Dart
AdjustConfig adjustConfig = new AdjustConfig('{YourAppToken}', AdjustEnvironment.Sandbox);
//...
adjustConfig.launchDeferredDeeplink= true;
//...
Adjust.start(adjustConfig);

sendInBackground

设置应用在后台运行时 SDK 是否发送信息。默认为 false​ 。

void setSendInBackground (boolean sendInBackground)
Dart
AdjustConfig adjustConfig = new AdjustConfig('{YourAppToken}', AdjustEnvironment.Sandbox);
//...
adjustConfig.sendInBackground= true;
//...
Adjust.start(adjustConfig);

needsCost

启用 SDK 来收集成本数据。您可以在用户的归因信息中访问该信息。

bool? needsCost;
Dart
AdjustConfig adjustConfig = new AdjustConfig('{YourAppToken}', AdjustEnvironment.Sandbox);
//...
adjustConfig.needsCost = true;
//...
Adjust.start(adjustConfig);

delayStart

要延迟 SDK 的启动时间,将延迟秒数以 数字​ 的形式进行传递。您最多可以将 SDK 的启动时间延迟 10​ 秒。

double? delayStart;
Dart
AdjustConfig adjustConfig = new AdjustConfig('{YourAppToken}', AdjustEnvironment.Sandbox);
//...
adjustConfig.delayStart(5.5);
//...
Adjust.start(adjustConfig);

用户代理

指定在每个请求中发送的用户代理字符串

 String? userAgent;
Dart
AdjustConfig adjustConfig = new AdjustConfig('{YourAppToken}', AdjustEnvironment.Sandbox);
//...
adjustConfig.userAgent = 'your-app/1.2.3"';
//...
Adjust.start(adjustConfig);

isDeviceKnown

指定设备是否已知。

bool? isDeviceKnown;
Dart
AdjustConfig adjustConfig = new AdjustConfig('{YourAppToken}', AdjustEnvironment.Sandbox);
//...
adjustConfig.isDeviceKnown= true;
//...
Adjust.start(adjustConfig);

eventBufferingEnabled

指定是否开启事件缓冲。开启后,SDK 会将事件存储在设备上,以每分钟一次的频率发送所有请求。

bool? eventBufferingEnabled;
Dart
AdjustConfig adjustConfig = new AdjustConfig('{YourAppToken}', AdjustEnvironment.Sandbox);
//...
adjustConfig.eventBufferingEnabled= true;
//...
Adjust.start(adjustConfig);