3

I want get user phone number programmatically to fill user phone number field in my application. I want to get second sim phone number for dual sim phone. But i can only fetch first sim phone number,i follow this link for fetch phone number. Programmatically obtain the phone number of the Android phone

 TelephonyManager tMgr = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);
    String mPhoneNumber = tMgr.getLine1Number();

add this into manifest

<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
Community
  • 1
  • 1
Suman
  • 1,307
  • 15
  • 32
  • http://stackoverflow.com/questions/14517338/android-check-whether-the-phone-is-dual-sim/17499889#17499889 – kgandroid Feb 18 '16 at 11:10
  • through this link can get imei number,but i want to get phone number @kgandroid – Suman Feb 18 '16 at 11:18
  • hey read this link http://stackoverflow.com/a/17499889/2219600 and [this](http://stackoverflow.com/questions/17618651/detect-target-phone-number-on-incoming-call/21448605#21448605) its very infomative – kinsley kajiva Jun 15 '16 at 06:11

0 Answers0