Back to project page markj.
The source code is released under:
GNU Lesser General Public License
If you think the Android project markj listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.markjmind.mobile.api.android.util; //from w w w . j a va 2s. c o m import android.content.Context; import android.telephony.TelephonyManager; public class PhoneInfo { /** * ??????? * @return */ public static String getPhoneNumber(Context context){ TelephonyManager telM = (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE); String phoneNum = telM.getLine1Number(); return phoneNum; } }