How to get Phone IMEI number with J2ME / JavaME
International Mobile Equipment Identity (IMEI) is used to identify valid devices connected to GSM and UMTS network. This number can be accessed from a mobile phone by dialing *#06# on the keypad. IMEI is commonly use by software developers as part of software protection scheme to prevent it from being pirated.
JavaME developers however suffers from a drawback because MIDP/CLDC specification does not include an API to obtain IMEI from mobile devices. However there are few phone manufacturers included this functionality through System.getPropery() calls.
Here’s how to get IMEI number from mobile devices of different manufacturers
Nokia
System.getProperty("phone.imei");
System.getProperty("com.nokia.IMEI");
Note ; Requires signed midlet. S60 3rd edition device does not requires signing for this to work.
Sony-Ericsson
System.getProperty("com.sonyericsson.imei");
Note ; might not work on all model, YMMV
Motorola
System.getProperty("IMEI");
System.getProperty("com.motorola.IMEI");
Samsung
System.getProperty("com.samsung.imei");
System.getProperty("com.siemens.imei");
Hopefully this information can aid you in your J2ME programming projects.
Quick Tip :
It’s quite hard to determine the phone model/manufacturer well ahead beforehand. For a more robust solution, I suggest that you combine the above call with System.getProperty(“microedition.platform”).
[tags]j2me,javame,mobile,opensource,imei,nokia,sony ericsson,samsung,motorola[/tags]
December 4th, 2007 at 7:40 pm
Hi I just tried to retrieve the IMEI number on my nokia N80 using the code above, but it didn’t work. Is it necessary to sign the jar file before installing on the device ? If so how is it possible to sign jar files ?
Thank you.
Sebastian
May 31st, 2008 at 8:11 pm
Hi, thanks very much for this information. I has just any more question: Is there any way (I think yes, but not sure) to get the phone manufacturer name?
September 26th, 2008 at 10:40 pm
The property for Samsung devices does not work. Have you tried on a real device? If you did and it worked, what device was it?
January 27th, 2009 at 7:33 pm
blog is very useful. thanks a lot. expecting more.. dont u mind i would like to know about designing a desktop like look (icons arranged in grids)this is not in canvas…
May 16th, 2009 at 6:01 pm
Thank you very much.This blog is very useful.
Plz carry on this task further
June 3rd, 2009 at 9:58 pm
thank’s for this information.
can any one help me in developping an applet for IMEI traking?
Best regards
June 26th, 2009 at 8:42 pm
DOESN’T WORK
System.out.println(“IMEI”+System.getProperty(“IMEI”));
System.out.println(“IMEI”+System.getProperty(“phone.imei”));
System.out.println(“IMEI”+System.getProperty(“com.nokia.IMEI”));
System.out.println(“IMEI”+System.getProperty(“com.sonyericsson.imei”));
System.out.println(“IMEI”+System.getProperty(“IMEI”));
System.out.println(“IMEI”+System.getProperty(“com.motorola.IMEI”));
System.out.println(“IMEI”+System.getProperty(“com.samsung.imei”));
System.out.println(“IMEI”+System.getProperty(“com.siemens.imei”));
July 8th, 2009 at 9:56 pm
much needed info would be found on this site
July 22nd, 2009 at 4:54 pm
much needed info would be found on this site –> Where can we find these information?
August 19th, 2009 at 1:19 pm
Nice article. I normally use the *#06# to find the imei number, & i used these procedure to unlock my mobile from http://www.mobile-unlocker.com/ but here to find the imei using java codes is very useful. Thanks for this information.
December 4th, 2009 at 11:09 pm
Well, it has been made manadatory by many govts thaat every mobile phone must have a valid imei number to be operantional and to be active.
December 9th, 2009 at 7:27 am
Absolutely cool blog. Keep on the good work, I will subscribe. What do you think of the new Nokia N97?
April 7th, 2010 at 4:41 pm
Can someone verify that these really work? I have tried these with sghi450(samsung s60), N95(s60) and 6300(s40) phones and all I get is null. why?
April 16th, 2010 at 9:28 pm
I am still experimenting with this, but on my Nokia 6220 Classic I have to use the following:
System.getProperty(“com.nokia.mid.imei”)
Perhaps this is of help to others?
April 28th, 2010 at 8:54 pm
The Nokia N97 is one of the best phones that i have ever owned. It is classy but feature packed. “
May 24th, 2010 at 1:24 pm
for blackberry devices use the following:
http://cf-sami.blogspot.com/2010/05/j2me-read-blackberry-device-name-device.html
June 11th, 2010 at 1:29 am
I am always on the lookout for new models of Nokia phone and also iPhone.;*.
July 27th, 2010 at 12:33 am
i am always on the lookout for new mobile devices. i am sort of a gadget addict.~`,
July 27th, 2010 at 12:50 am
Nokia always makes the coolest mobile phone.-;-
September 11th, 2010 at 2:54 am
I want to get IMEI number of Nokia N82 set using j2me.
System.getProperty(“com.nokia.mid.IMEI”)
System.getProperty(“phone.imei”)
System.getProperty(“com.nokia.IMEI”)
I have used these methods to get IMEi Number of Nokia Sets. But it retuns null. Is there any other way to get the IMEI number of the phone.
September 13th, 2010 at 1:11 am
mobile devices will feature more and more useful features in the next following years”`”
September 13th, 2010 at 1:25 am
i often use my mobile phone compared to my netbooks,”;
October 25th, 2010 at 2:53 am
we would definitely see some new mobile devices this year and of course in the first quarter of 2011*,`
October 25th, 2010 at 3:21 am
mobile phones are getting cheaper and cheaper, i just hope that they add more features into it`-’
November 9th, 2010 at 11:11 am
even though the Nokia N97 is an out dated model, it is still one of the best phones in the market .
November 28th, 2010 at 1:11 am
Yes, we tried the following code
System.getProperty(”com.nokia.mid.imei”)
on a Nokia 5230 and it worked correctly.
December 21st, 2010 at 2:32 am
mobile devices are always great because they always come in a handy package .’:
December 24th, 2010 at 11:00 am
Yes, we tried the following code System.getProperty(”com.nokia.mid.imei”) on a Nokia 5230 and it worked correctly.
March 8th, 2011 at 4:00 pm
I don’t get this in my Nokia 6303 classic
June 23rd, 2011 at 11:41 am
dear frends,
can anyone plz help me iam developing bluetooth enabled j2me project for my reseacrch purpose in univercity.so i need to good authentication to combination with trusted user with server.so u send me the sample code to j2me(mobile application) and server application is C# need to exchange good key management(like Diffie Hellman algorithm).so if u r fammilier with these kind of project plz help me.iam stuck in key exchange to get the authentication purpose.plz help me.