perrot wrote: > I was tried to get the phone number in a real device.But the function > "getLine1Number" always return a empty string.Why? > How do I get the phone number in a read device?
getLine1Number() usually returns a value off of the SIM card. Sometimes this is the correct phone number. Sometimes it is an invalid value. Sometimes it is the wrong phone number -- on my personal phone, it returns the phone's original number, before an existing mobile number was ported over. I am not aware of another option, however. Even on the Settings screen, my personal phone reports the wrong number, so I have no evidence that there is a better solution hidden somewhere inside Android. Sorry! -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _Beginning Android 2_ from Apress Now Available! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

