Skip to content Skip to sidebar Skip to footer

Unable To Fetch Mobile Number On Android 2.2

I have used the standard code below to fetch the mobile number on my ANDROID 2.2 GSM device, BUT I ALWAYS GET AN EMPTY STRING. Is this feature supported on 2.2? Any suggestion as

Solution 1:

Go to Settings -> About phone -> Status -> see at My Phone Number field. If it says "Unknown" then it's not your issue, it's just the fact that some carriers don't pack the SIM cards with own number. On some devices user can edit own number, but it's not always supported by the firmware.

Read here

Solution 2:

That should work, but make sure you're requesting the READ_PHONE_STATE permission in your Manifest:

<uses-permissionandroid:name="android.permission.READ_PHONE_STATE" />

Post a Comment for "Unable To Fetch Mobile Number On Android 2.2"