Vote count:
0
I want to get the user phone number. I user code from previous answer here (old one) :
in the manifest:
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
in the activity :
TelephonyManager tMgr = (TelephonyManager)this.getSystemService(Context.TELEPHONY_SERVICE);
String mPhoneNumber = tMgr.getLine1Number();
running this on my phone, gives me null String. in which case it happen , and maybe there is others option?
asked 1 min ago
android - get user phone number
Aucun commentaire:
Enregistrer un commentaire