Initial commit: 91dj android client dev_1.0.0

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
谢宇宁
2026-10-08 11:37:25 +07:00
co-authored by Claude Opus 5.5
commit 97dd6a739a
1262 changed files with 119813 additions and 0 deletions
@@ -0,0 +1,18 @@
import 'package:analytics_sdk/utils/platform_storage.dart';
import 'package:analytics_sdk/utils/uuid_util.dart';
const _kDeviceIdStorageKey = 'analytics_device_id';
Future<String> generateOrLoadDeviceId() async {
try {
final existing =
(await PlatformStorage.read(_kDeviceIdStorageKey))?.trim() ?? '';
if (existing.isNotEmpty) return existing;
final generated = generateUuidV4();
await PlatformStorage.write(_kDeviceIdStorageKey, generated);
return generated;
} catch (_) {
return '';
}
}