To get the phone number from the device , first you have to set your own 
phone number on the device, just through :

Settings -> About Phone -> Status -> My phone Number

Phone numbers are not available on SIM for each operators, like in india 
Sim dont have phone numbers in any memory, So WE cant get phone number from 
these connection. However, some countries, and operators have stored phone 
numbers on SIM, and we can get those. TO make this to work for all devices 
we can employ two strategies:

On Monday, January 2, 2012 at 4:43:07 PM UTC+5:30, Upendra wrote:
>
> Hi All,
>
> I am trying to fetch the telephone number of the device. I am calling 
> TelephonyManager.getLine1Number() 
>  it always returns null. 
> Thank you in advance....
>
> Regards
> Upendra Reddy.V
>

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/9a037b5f-34b2-4921-8374-1c0cc564758a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to