For devices with a SIM card, getLine1Number() on TelephonyManager should return that number. However, please bear in mind that a SIM does not have to have a phone number (getLine1Number() returns null), and that the SIM might have the wrong phone number. There is no reliable way from the Android SDK to find out the phone number of the device, AFAIK.
On Fri, Apr 27, 2012 at 5:34 AM, ibrahim <[email protected]> wrote: > Hey all, > I new to the Android SDK. I'm working on an application that requires > the sim phone number > Is there anyway to get the phone number of the SIM card, instead of > sending a verification sms > > Thanks all... > > -- > 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 -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- 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

