mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
Bugfix/persistent UUID (#46)
* UUID is now persisted between reinstallation
This commit is contained in:
parent
e085a10cf3
commit
c624580596
6 changed files with 31 additions and 9 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue