Getting Device IMEI

前端 未结 4 992
萌比男神i
萌比男神i 2020-12-06 12:35

How to get the IMEI of a Java ME device in a common way that is applicable to all devices

4条回答
  •  醉酒成梦
    2020-12-06 13:20

    Usually, using java.lang.System.getProperty() can return the device IMEI.

    Unfortunately, the String parameter you need to use to get the IMEI will change from one handset manufacturer to the next.

    Strings to try:

    imei
    phone.imei
    com.lge.imei
    com.nokia.imei
    com.nokia.mid.imei
    com.siemens.imei
    com.sonyericsson.imei
    com.motorola.imei
    ...
    you get the idea.

    you may need to uppercase the last part of the string.

    the format of the result can change too.
    it can be a full imei with a "IMEI" prefix and 3 "-" in the middle of 17 digits.
    it can be a normalized imei of 13 or 15 digits...

提交回复
热议问题