I'm trying to get the phone number using below code,
TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
phoneImei = tm.getDeviceId();
phoneNo = tm.getLine1Number();
but, it returns me null value. When I checked the setting, phone number was unknown. I'm using galaxy nexus. Any idea how i can solve this.?