Hello!
There was a need to substitute a phone number in TextView.
Now I try to get this information as follows:
TelephonyManager telephonyManager =(TelephonyManager)getSystemService(TELEPHONY_SERVICE); String lineNumber = telephonyManager.getLine1Number();
Everything works on Genymotion, not on real devices.
Tell me, dear, how to get a number? mk For example, Viber on the same devices determines the number somehow. Thanks for the help!
permisions are cast.
UPD. Your phone number is required, i.e. numbers from a sim card in the device.