在颤抖中获得设备IMEI [英] get device IMEI in flutter
本文介绍了在颤抖中获得设备IMEI的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在颤抖的
中获取设备 IMEI ,我正在尝试使用以下插件获取唯一标识符:
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
所有人都获得ID,但设备的IMEI ID不同
all of them geting ID but not the same IMEI ID for device
,当我尝试使用本示例中的device_info插件时 DeviceInfoPlugin
i得到错误:
and when i try to use device_info plugin from this example DeviceInfoPlugin i get error :
此版本中的多个项目都有项目
推荐答案
获取唯一标识符的最佳方法...
The best way to get unique identifier ...
在Android中:使用 unique_identifier
以获得IMEI
in Android: using unique_identifier
to get IMEI
dev_dependencies:
unique_identifier: ^0.0.3
String identifier =await UniqueIdentifier.serial;
:Apple不再允许您检索IMEI或任何其他设备标识,但是您可以生成UDID起诉:
in IOS: Apple no longer allows you to retrieve the IMEI or any other device identification,but you can generate UDID suing:
import 'package:device_info/device_info.dart';
final DeviceInfoPlugin deviceInfoPlugin = new DeviceInfoPlugin();
var data = await deviceInfoPlugin.iosInfo;
identifier = data.identifierForVendor;
这篇关于在颤抖中获得设备IMEI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文