0

I like to know its possible by enter IMEI number can my app detect users current device phone number.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62

1 Answers1

-2

May be you can use this code to get the phone number.

Code:

TelephonyManager phneMgr = (TelephonyManager)mAppContext.getSystemService(Context.TELEPHONY_SERVICE);
String phneNmbr = phneMgr.getLine1Number();

Required Permission

    <uses-permission android:name="android.permission.READ_PHONE_STATE"/> 
jgm
  • 1,230
  • 1
  • 19
  • 39
  • above code doesn't working with all devices so i looking is there possibility to get phone number through IMEI number. – Abhinesh Ch Apr 15 '16 at 13:04