how to get the telephone number in real device
i want to know get the number of device by telephoneManager and getLine1Number() ,it is 开发者_C百科workly well in analog machine,but in real device i donot get,could you tell me why?
in the com.android.internal.telephony inlude getLine1Number() ,how can use the inner class?
This question has been asked and answered on SO a number of times. The phone number is (possibly) stored on the SIM-card and you can get it with TelephonyManager.getLine1Number() however, it is not reliable. Some SIM cards don't have the phone number on them (in which case you will get null) and if the user changes his phone number without swapping his SIM card then you will get his old phone number.
加载中,请稍侯......
精彩评论