Added in API level 34
DeviceId
class DeviceId
| kotlin.Any | |
| ↳ | android.devicelock.DeviceId |
The response returned from DeviceLockManager.getDeviceId on success. A DeviceId represents a stable identifier (i.e. an identifier that is preserved after a factory reset). At this moment, the only supported identifiers are IMEI, MEID and the Device Serial Number.
Summary
| Constants | |
|---|---|
| static Int |
The device id is an IMEI |
| static Int |
The device id is a MEID |
| static Int |
The device id is a serial number |
| Public methods | |
|---|---|
| String |
getId() |
| Int |
getType() |
Constants
DEVICE_ID_TYPE_IMEI
Added in API level 34
static val DEVICE_ID_TYPE_IMEI: Int
The device id is an IMEI
Value: 0DEVICE_ID_TYPE_MEID
Added in API level 34
static val DEVICE_ID_TYPE_MEID: Int
The device id is a MEID
Value: 1DEVICE_ID_TYPE_SERIAL_NUMBER
Added in API level 36.1
static val DEVICE_ID_TYPE_SERIAL_NUMBER: Int
The device id is a serial number
Value: 2Public methods
getType
Added in API level 34
fun getType(): Int
| Return | |
|---|---|
Int |
Value is android.devicelock.DeviceId#DEVICE_ID_TYPE_IMEI, android.devicelock.DeviceId#DEVICE_ID_TYPE_MEID, or android.devicelock.DeviceId#DEVICE_ID_TYPE_SERIAL_NUMBER |