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 to how I can fetch the mobile number on Android 2.2 device.
private String getMyPhoneNumber(){
TelephonyManager mTelephonyMgr;
mTelephonyMgr = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
return mTelephonyMgr.getLine1Number();
}