简体   繁体   中英

Is it possible to get device phone number by imei number in android

我想知道通过输入IMEI号码可以实现我的应用检测用户当前设备​​电话号码的可能性。

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"/> 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM