READ_PHONE_STATE permission you should add...
But if it is Tablet PC or mp4 player for android(not now) it will
return null..You can try catch block for good performance

2011/9/21, TreKing <[email protected]>:
> On Wed, Sep 21, 2011 at 2:46 AM, krishna chaitanya <
> [email protected]> wrote:
>
>> its showing the number in the emulator, but when ran on the device
>> its giving null..
>>
>
> http://developer.android.com/reference/android/telephony/TelephonyManager.html#getLine1Number()
>
> -------------------------------------------------------------------------------------------------
> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
> transit tracking app for Android-powered devices
>
> --
> 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

-- 
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

Reply via email to