2014-02-14 47 views

回答

0

你可以試試這個:

TelephonyManager telephonyManager = ((TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE)); 

String imeiSIM1 = telephonyManager.getDeviceId();; 

Refer this For More Clear Information

希望能幫助

+0

這對我非常有用非常感謝你.. – debid

+0

愛總是幫助:) – nitesh

0

使用以下用於獲取手機號碼及IMEI號碼

TelephonyManager tm = (TelephonyManager)Your_Context getSystemService(Context.TELEPHONY_SERVICE); 
// get IMEI 
String imei = tm.getDeviceId(); 
String phone = tm.getLine1Number(); 

但它並不總是如非手機設備可靠。您還需要添加批准"android.permission.READ_PHONE_STATE"

+0

我是新與Android應用.. \t \t 這是非常有用的,我謝謝非常多.. – debid

+0

很高興幫助你:-)。 – Andrain

+0

如何我可以投票任何問題stackoverflow.com – debid

相關問題