I am developing an android application in which i have to get the device phone no in which my application is installed.I tried lot of ways.Searched google also.Bhe code that i am getting is for imei number,not the mobile no ??
But not got the result
I tried using
Can anyone guide me how to implement this ??
I will be really thankful to you
Regards Tushar Sahni
Is this what you are looking for?
TelephonyManager tmgr=(TelephonyManager)this.getSystemService(Context.TELEPHONY_SERVICE) ;
String phoneNum = tmgr.getLine1Number();
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.