安卓获取本机手机号

TelephonyManager phoneMgr=(TelephonyManager)this.getSystemService(Context.TELEPHONY_SERVICE);
txtPhoneModel.setText(Build.MODEL); //手机型号
txtPhoneNumber.setText(phoneMgr.getLine1Number());//本机电话号码
txtSdkVersion.setText(Build.VERSION.SDK);//SDK版本号
txtOsVersion.setText(Build.VERSION.RELEASE);//Firmware/OS 版本号

你可能感兴趣的:(android)