fix:增加图片选择和拍照功能
This commit is contained in:
@@ -43,6 +43,8 @@ class DeviceHeaderService {
|
||||
String _androidOaid = '';
|
||||
String _androidImei = '';
|
||||
String _androidMac = '';
|
||||
IosDeviceInfo? iosDeviceInfo;
|
||||
AndroidDeviceInfo? androidDeviceInfo;
|
||||
Future<void>? _baseInitialization;
|
||||
Future<void>? _identityInitialization;
|
||||
|
||||
@@ -120,9 +122,23 @@ class DeviceHeaderService {
|
||||
_iosIdfv = await _resolveIdfv();
|
||||
await _collectIosPaidIfMissing();
|
||||
}
|
||||
await getDeviceInfo();
|
||||
} catch (_) {}
|
||||
}
|
||||
|
||||
Future<void> getDeviceInfo() async {
|
||||
try {
|
||||
final deviceInfoPlugin = DeviceInfoPlugin();
|
||||
if (Platform.isIOS) {
|
||||
iosDeviceInfo = await deviceInfoPlugin.iosInfo;
|
||||
} else if (Platform.isAndroid) {
|
||||
androidDeviceInfo = await deviceInfoPlugin.androidInfo;
|
||||
}
|
||||
} catch (e) {
|
||||
print('$e');
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> _collectAndroidIdIfAgreed() async {
|
||||
if (_androidId.isNotEmpty) return;
|
||||
if (!StorageService.to.getBool(storagePrivacyAgreed)) return; // 隐私同意后才采集
|
||||
|
||||
Reference in New Issue
Block a user