How to get IMEI for J2ME supported all devices? [duplicate]

我与影子孤独终老i 提交于 2019-12-18 12:37:49

问题


Possible Duplicate:
how to dynamically get mobile IMEI number in J2me?

is there any way to get IMEI for J2ME supported all devices??i did some googling and find out the below solution but it is for device specific.

Nokia. System.getProperty("com.nokia.IMEI");

SonyEricsson System.getProperty("com.sonyericsson.imei");

Motorola System.getProperty("com.motorola.IMEI");

is there any generic way to fetch IMEI for all devices??


回答1:


There is no generic method to fetch IMEI for all devices, you have to do it by coding only. You can try it in alternate way like use System class as follows,

System.getProperty(“microedition.platform”);

This will going to return you the name of the host platform or device. In Nokia devices the name consists of “Nokia”, the device model, and software version separated by “/”. There is no space between “Nokia” and the model number nor on either side of “/”. Formally, the syntax of the platform string is: Nokia MODEL_NUMBER “/” SW_VERSION. For example, Nokia6310i/4.42 or Nokia3510i/p1.25.

From the result you can fetch the manufacture and use Switch case to get IMEI by coding,



来源:https://stackoverflow.com/questions/12968395/how-to-get-imei-for-j2me-supported-all-devices

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!