mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
Bugfix/persistent UUID (#46)
* UUID is now persisted between reinstallation
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import 'package:device_info_plus/device_info_plus.dart';
|
||||
import 'package:flutter_udid/flutter_udid.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class DeviceInfoService {
|
||||
@@ -9,16 +10,14 @@ class DeviceInfoService {
|
||||
String deviceType = "";
|
||||
|
||||
try {
|
||||
AndroidDeviceInfo androidInfo = await deviceInfo.androidInfo;
|
||||
deviceId = androidInfo.androidId;
|
||||
deviceId = await FlutterUdid.consistentUdid;
|
||||
deviceType = "ANDROID";
|
||||
} catch (e) {
|
||||
debugPrint("Not an android device");
|
||||
}
|
||||
|
||||
try {
|
||||
IosDeviceInfo iosInfo = await deviceInfo.iosInfo;
|
||||
deviceId = iosInfo.identifierForVendor;
|
||||
deviceId = await FlutterUdid.consistentUdid;
|
||||
deviceType = "IOS";
|
||||
debugPrint("Device ID: $deviceId");
|
||||
} catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user