How to get IMEI for J2ME supported all devices? [d

2019-02-05 10:32发布

问题:

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,