update version
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:adjust_sdk/adjust.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:uuid/uuid.dart';
|
||||
import 'package:android_id/android_id.dart';
|
||||
@@ -18,10 +19,10 @@ class DeviceInfo {
|
||||
Future<Map<String, dynamic>> deviceInfo({
|
||||
int adidTimeout = -1,
|
||||
bool includeInstallReferrer = false,
|
||||
bool includeAdjust = true,
|
||||
}) async {
|
||||
final Map<String, dynamic> json = {};
|
||||
|
||||
|
||||
try {
|
||||
adidTimeout = getTimeOut(adidTimeout);
|
||||
final packageInfo = await PackageInfo.fromPlatform();
|
||||
@@ -44,15 +45,24 @@ class DeviceInfo {
|
||||
json["model"] = androidInfo.model;
|
||||
json["device"] = androidInfo.device;
|
||||
json["androidId"] = await getAndroidId();
|
||||
|
||||
} else if (Platform.isIOS) {
|
||||
final iosInfo = await devicePlugin.iosInfo;
|
||||
json["osVersion"] = iosInfo.systemVersion;
|
||||
json["model"] = iosInfo.model;
|
||||
json["device"] = iosInfo.modelName;
|
||||
json["androidId"] = iosInfo.identifierForVendor;
|
||||
json['idfv'] = iosInfo.identifierForVendor;
|
||||
try {
|
||||
json['idfa'] = await Adjust.getIdfa();
|
||||
if (includeAdjust) {
|
||||
json['adjustAdId'] = await Adjust.getAdid();
|
||||
final adjustAttribution = await Adjust.getAttribution();
|
||||
json['adjustAttribution'] = adjustAttribution.jsonResponse;
|
||||
json["clickLable"] = adjustAttribution.clickLabel;
|
||||
}
|
||||
} catch (_) {}
|
||||
|
||||
debugPrint("$iosInfo");
|
||||
|
||||
}
|
||||
|
||||
if (includeInstallReferrer) {
|
||||
|
||||
Reference in New Issue
Block a user