Q:

what is the USSD to get mobile number

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? 

A:

USSD isn't really supported in Android.   But even if you can get it to work, USSD codes vary by carrier

