i have an android application which requires to get the mobile number. i tried this
TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
String number = tm.getLine1Number();
but it returns null, after I read the documentation of the TelephoneManager
I understood that some phones don't have the mobile number they are working on.
the solution was to send an USSD code to get it.
I couldn't find that, any help please?