I like to know its possible by enter IMEI
number can my app detect users current device phone number.
Asked
Active
Viewed 1,458 times
0

Vadim Kotov
- 8,084
- 8
- 48
- 62

Abhinesh Ch
- 11
- 3
-
I'm not sure that the device or SIM card contain own phone number (like +1 123456...). – Mikalai Daronin Apr 15 '16 at 10:23
-
ya, you are right but how do facebook reads my current phone number when ever i login with new device its suggestion current using number with pre-filled. do you have any idea how this happens – Abhinesh Ch Apr 15 '16 at 13:11
-
I believe that Facebook uses your own contact from device's contact list. – Mikalai Daronin Apr 15 '16 at 13:17
1 Answers
-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