[android-developers] Re: TelephonyManager is not returing My phone number
So the phone doesn't know its own phone number as you had discovered
it by looking at the phone status. Why do you think the API should
miracolously figure out the phone number for you?
FYI, my phone is also showing "Unknown" for my number -- it's probably
dependent on the operator and the SIM card they provide. The phone
number is NOT used for routing a call on a GSM network, so it's not
aboslutely needed for the operation of your phone.
On May 24, 1:34 pm, Babita kumari <babita.permeat...@gmail.com> wrote:
> In my project, I need to take the phone number, that i am doing Using
> Following code:-
>
> TelephonyManager telephonyManager = (TelephonyManager) context
> .getSystemService(Context.TELEPHONY_SERVICE);
> telephonyManager.getLine1Number();
>
> The last line suppose to return phone number. But its returning anything. I
> checked in setting>about phone> and there also my Phone number is
> "unknown".
>
> can anyone tell how to fix this problem.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home