how can i get device IMEI in flutter i'm trying to get Unique Identifier using the following plugins:
uuid_type: ^0.7.0-dev
uuid: ^1.0.3
unique_identifier: ^0.0.3
flutter_udid: ^0.0.3
all of them geting ID but not the same IMEI ID for device
and when i try to use device_info plugin from this example DeviceInfoPlugin i get error :
Multiple projects in this build have project
The best way to get unique identifier ...
in Android: using unique_identifier to get IMEI
dev_dependencies:
unique_identifier: ^0.0.3
String identifier =await UniqueIdentifier.serial;
in IOS: Apple no longer allows you to retrieve the IMEI or any other device identification,but you can generate UDID using:
import 'package:device_info/device_info.dart';
final DeviceInfoPlugin deviceInfoPlugin = new DeviceInfoPlugin();
final data = await deviceInfoPlugin.iosInfo;
identifier = data.identifierForVendor;
Android no longer allows you to access the IMEI or any other device identifier starting from android 10. Third party apps can not use IMEI & the serial number of a phone and other non-resettable device identifiers. So, now you can't access:
getSerial(),
getImei(),
getDeviceId(),
getSimSerialNumber(),
getSubscriberId()
You have to use another unique identifier for this like Android ID
Please refer: https://developer.android.com/preview/privacy/data-identifiers#device-ids
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With