DeviceIdentity class

获取设备标识

Constructors

DeviceIdentity()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

androidId Future<String>
获取安卓ID,可能为空
no setter
imei Future<String>
获取IMEI,只支持Android 10之前的系统,需要READ_PHONE_STATE权限,可能为空
no setter
isAndroid bool
判断是否是安卓平台
no setter
oaid Future<String>
获取OAID/AAID,可能为空
no setter
ua Future<String>
获取UA
no setter

Static Methods

register() Future<void>
Application#onCreate里初始化,注意APP合规性,若最终用户未同意隐私政策则不要调用