Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
313 views
in Technique[技术] by (71.8m points)

java me - Getting Device IMEI

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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...


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...