ups sory ketinggalan... private final static String platform = System.getProperty("microedition.platform"); public static void getImeiNo() { String no = null; if(platform.toLowerCase().indexOf("nokia") >= 0) { no = System.getProperty("com.nokia.mid.imei"); } if(platform.toLowerCase().indexOf("sony") >= 0) { no = System.getProperty("com.sonyericsson.imei"); } if(platform.toLowerCase().indexOf("motorola") >= 0) { no = System.getProperty("com.motorola.IMEI"); } if(platform.toLowerCase().indexOf("samsung") >= 0) { no = System.getProperty("com.samsung.imei"); } if(platform.toLowerCase().indexOf("siemens") >= 0) { no = System.getProperty("com.siemens.imei"); } if(platform.toLowerCase().indexOf("lg") >= 0) { no = System.getProperty("com.lge.imei"); } if(no != null) { imeiNo = no; } }
2010/6/16 ryan zen <ryan_...@yahoo.com> > > > > platform ?? > itu sebuah class atau variable biasa? > > maaf soalnya sy masih pemula... > > ----- Pesan Diteruskan ---- > *Dari:* Adid <msya...@gmail.com> > > *Kepada:* jug-indonesia@yahoogroups.com > *Terkirim:* Sel, 15 Juni, 2010 12:59:12 > *Judul:* Re: Bls: [JUG-Indonesia] ASK : GET IMEI HP di J2ME > > > > iya memang ada beberapa hp yg qt ga bs dapet imei-nya, seperti hp Motorola > yg software-nya buatan china jg tidak bs ngambil IMEI-nya... > > Berikut ada sedikit cth code buat dapetin IMEI dibeberapa merk hp : > > public static void getImeiNo() { > String no = null; > if(platform. toLowerCase( ).indexOf("nokia") >= 0) { > no = System.getProperty("com.nokia.mid. imei"); > > } > if(platform. toLowerCase( ).indexOf("sony") >= 0) { > no = System.getProperty("com.sonyericsson. imei"); > > } > if(platform. toLowerCase( ).indexOf("motorola") >= 0) { > no = System.getProperty("com.motorola. IMEI"); > > } > if(platform. toLowerCase( ).indexOf("samsung") >= 0) { > no = System.getProperty("com.samsung. imei"); > > } > if(platform. toLowerCase( ).indexOf("siemens") >= 0) { > no = System.getProperty("com.siemens. imei"); > > } > if(platform. toLowerCase( ).indexOf("lg") >= 0) { > no = System.getProperty("com.lge.imei"); > } > if(no != null) { > imeiNo = no; > } > } > > semoga bermanfaat.. . > > 2010/6/14 <mirken...@gmail. com <mirken...@gmail.com>> > >> >> >> Gak tahu bener ap gak kodenya, lg gak ad komputer ni :p. coba aj googling >> gimana cara dapetin imei. Dulu kalo gak salah saya pernah lihat diforum >> nokia apa sony ericsson gitu.. >> >> Powered by Telkomsel BlackBerry® >> ------------------------------ >> *From: * ryan zen <ryan_...@yahoo. com <ryan_...@yahoo.com>> >> *Sender: * jug-indonesia@ yahoogroups. com<jug-indonesia@yahoogroups.com> >> *Date: *Mon, 14 Jun 2010 15:17:42 +0800 (SGT) >> *To: *<jug-indonesia@ yahoogroups. com <jug-indonesia@yahoogroups.com>> >> *ReplyTo: * jug-indonesia@ yahoogroups. com<jug-indonesia@yahoogroups.com> >> *Subject: *Bls: [JUG-Indonesia] ASK : GET IMEI HP di J2ME >> >> >> >> >> makasih.. buat jawabannya.. >> >> iya sich hp nya hp cina...!! >> >> tp script yg sy tulis td udah bener? >> >> >> >> ------------------------------ >> *Dari:* "mirken...@gmail. com <mirken...@gmail.com>" <mirken...@gmail. >> com <mirken...@gmail.com>> >> *Kepada:* jug-indonesia@ yahoogroups. com <jug-indonesia@yahoogroups.com> >> *Terkirim:* Sen, 14 Juni, 2010 14:12:28 >> *Judul:* Re: [JUG-Indonesia] ASK : GET IMEI HP di J2ME >> >> >> >> Handset yang ditest apa? >> (Kalo hp cina) menurut pengalaman saya, beberapa hp cina memang g bisa di >> "get" imei-nya. So, imei g bisa jd patokan. >> >> Powered by Telkomsel BlackBerry® >> ------------------------------ >> *From: * ryan zen <ryan_...@yahoo. com> >> *Sender: * jug-indonesia@ yahoogroups. com >> *Date: *Mon, 14 Jun 2010 15:05:59 +0800 (SGT) >> *To: *<jug-indonesia@ yahoogroups. com> >> *ReplyTo: * jug-indonesia@ yahoogroups. com >> *Subject: *[JUG-Indonesia] ASK : GET IMEI HP di J2ME >> >> >> >> senior2 java... >> >> saya mau tanya nich... >> >> gmn ya cara get imei hp di j2me? >> sya udah coba pake ini : >> >> public static String getIMEI(){ >> >> String out = ""; >> try{ >> out = System.getProperty( "com.imei" ); >> if(out== null ||out.equals( >> "null")|| >> out.equals(" ")) >> out = System.getProperty( "phone.imei" ); >> >> if(out== null ||out.equals( "null")|| out.equals(" ")) >> out = System.getProperty( "com.nokia. IMEI"); >> if(out== null ||out.equals( "null")|| out.equals(" ")) >> >> out = System.getProperty( "com.nokia. mid.imei" >> ); >> if(out== null ||out.equals( "null")|| out.equals(" ")) >> out = System.getProperty( "com.nokia. mid.imei" >> ); >> >> if(out== null ||out.equals( "null")|| out.equals(" ")) >> out = System.getProperty( "com.sonyericsso >> n.imei"); >> if(out== null ||out.equals( "null")|| out.equals(" ")) >> >> out = System.getProperty( "IMEI"); >> if(out== null ||out.equals( "null")|| out.equals(" ")) >> >> out = System.getProperty( "com.motorola. IMEI"); >> if(out== null ||out.equals( "null")|| out.equals(" ")) >> out = System.getProperty( "com.samsung. imei"); >> >> if(out== null ||out.equals( "null")|| out.equals(" ")) >> out = >> System.getProperty( "com.siemens. imei"); >> if(out== null ||out.equals( "null")|| out.equals(" ")) >> >> out = System.getProperty( "imei"); >> }catch(Exception e){ >> >> return out==null?"" :out; >> } >> return out==null?"" :out; >> } >> >> >> tp ga bisa... tiap kali manggil >> hasilnya past kosong... >> ga menghasilkan apa2!! >> >> mhon bantuannya.. ... >> >> >> terima kasih >> >> >> >> > > > -- > Thanks & Best Regards, > > Muhammad Syadid > Y! : adid_m > blog : adidm.wordpress. com <http://adidm.wordpress.com> > > > -- Thanks & Best Regards, Muhammad Syadid Y! : adid_m blog : adidm.wordpress.com