永州建设网站,html网站源码下载,中国企业名录黄页,网络文化经营许可证在哪里办1、获取手机制造厂商2、获取手机型号3、获取手机系统当前使用的语言4、获取Android系统版本号5、获取手机IMEI串号6、获取手机中的语言列表SystemUtil类1./**2.* 系统工具类3.* Created by zhuwentao on 2016-07-18.4.*/5. public class SystemUtil {6.7./**8.* 获取当前手机系…1、获取手机制造厂商2、获取手机型号3、获取手机系统当前使用的语言4、获取Android系统版本号5、获取手机IMEI串号6、获取手机中的语言列表SystemUtil类1./**2.* 系统工具类3.* Created by zhuwentao on 2016-07-18.4.*/5. public class SystemUtil {6.7./**8.* 获取当前手机系统语言。9.*10. * return 返回当前系统语言。例如当前设置的是“中文-中国”则返回“zh-CN”11. */12. public static String getSystemLanguage() {13. return Locale.getDefault().getLanguage();14. }15.16. /**17. * 获取当前系统上的语言列表(Locale列表)18. *19. * return 语言列表20. */21. public static Locale[] getSystemLanguageList() {22. return Locale.getAvailableLocales();23. }24.25. /**26. * 获取当前手机系统版本号27. *28. * return 系统版本号29. */30. public static String getSystemVersion() {31. return android.os.Build.VERSION.RELEASE;32. }33.34. /**35. * 获取手机型号36. *37. * return 手机型号38. */39. public static String getSystemModel() {40. return android.os.Build.MODEL;41. }42.43. /**44. * 获取手机厂商45. *46. * return 手机厂商47. */48. public static String getDeviceBrand() {49. return android.os.Build.BRAND;50. }51.52. /**53. * 获取手机IMEI(需要“android.permission.READ_PHONE_STATE”权限)54. *55. * return 手机IMEI56. */57. public static String getIMEI(Context ctx) {58. TelephonyManager tm (TelephonyManager) ctx.getSystemService(Activity.TELEPHONY_SERVICE);59. if (tm ! null) {60. return tm.getDeviceId();61. }62. return null;63. }64. }其中获取手机IMEI需要在AndroidManifest.xml中加上权限1. android:nameandroid.permission.READ_PHONE_STATE /使用这些方法的时候直接调用就好了1. private void showSystemParameter() {2.String TAG 系统参数;3.Log.e(TAG, 手机厂商 SystemUtil.getDeviceBrand());4.Log.e(TAG, 手机型号 SystemUtil.getSystemModel());5.Log.e(TAG, 手机当前系统语言 SystemUtil.getSystemLanguage());6.Log.e(TAG, Android系统版本号 SystemUtil.getSystemVersion());7.Log.e(TAG, 手机IMEI SystemUtil.getIMEI(getApplicationContext()));8.}返回结果IMEI号IESI号手机型号privatevoidgetInfo() {TelephonyManager mTm (TelephonyManager) getSystemService(TELEPHONY_SERVICE);String imei mTm.getDeviceId();String imsi mTm.getSubscriberId();String mtype android.os.Build.MODEL; // 手机型号String numer mTm.getLine1Number(); // 手机号码有的可得有的不可得}手机型号 Build.MODELThe end-user-visible name for the end product.sdk版本 Build.VERSION.SDKThis constant is deprecated. Use SDK_INT to easily get this as an integer.及frimware版本号(系统版本号) Build.VERSION.RELEASEThe user-visible version string.事实上Build能向我们提供包括 硬件厂商硬件编号序列号等很多信息 调用方法也都同上很简单。The name of the underlying board, like goldfish.The system bootloader version number.The brand (e.g., carrier) the software is customized for, if any.The name of the instruction set (CPU type ABI convention) of native code.The name of the second instruction set (CPU type ABI convention) of native code.The name of the industrial design.A build ID string meant for displaying to the userA string that uniquely identifies this build.The name of the hardware (from the kernel command line or /proc).Either a changelist number, or a label like M4-rc20.The manufacturer of the product/hardware.The end-user-visible name for the end product.The name of the overall product.The radio firmware version number.A hardware serial number, if available.Comma-separated tags describing the build, like unsigned,debug.longThe type of build, like user or eng.Value used for when a build property is unknown.明确几个概念SIM卡存储的数据可分为四类第一类是固定存放的数据。这类数据在移动电话机被出售之前由SIM卡中心写入包括国际移动用户识别号(IMSI)、鉴权密钥(KI)、鉴权和加密算法等等。第二类是暂时存放的有关网络的数据。如位置区域识别码(LAI)、移动用户暂时识别码(TMSI)、禁止接入的公共电话网代码等。第三类是相关的业务代码如个人识别码(PIN)、解锁码(PUK)、计费费率等。第四类是电话号码簿是手机用户随时输入的电话号码。用户全部资料几乎都存储在SIM卡内因此SIM卡又称为用户资料识别卡。IMSI是一个唯一的数字 标识了GSM和UMTS 网络里的唯一一个用户. 它存储 在手机的SIM卡里它会通过手机发送到网络上. IMSI 与 SIM唯一对应IMEI也是一串唯一的数字 标识了 GSM 和 UMTS网络里的唯一一个手机.它通常被打印在手机里电池下面的那一面拨 *#06# 也能看到它. IMEI 与 设备唯一对应.1。IMEI不存在于SIM卡中它是手机本身的串号。2。通常我们所说的手机号也不存在于SIM卡中虽然SIM卡中有一个专门存储SIM卡本身号码的地方但是此号码是通过手工设定的而且是可以更改的。 SIM卡的识别通常使用IMSI号这个对于SIM卡是唯一的。3。使用SimGetRecordInfo之类的函数获得SIM卡的IMSI号码能否成功依赖于设备制造商是否实现了此函数据我所知在DOPOD的机器上是可以获得但是在联想的机器上却不行其他机器没有。4。获得IMEI以及IMSI可以通过RIL或者TAPI中的LINE操作的函数获得。记得添加权限Android:nameandroid.permission.READ_PHONE_STATE /获取手机屏幕高度privatevoidgetWeithAndHeight(){//这种方式在service中无法使用DisplayMetrics dm newDisplayMetrics();getWindowManager().getDefaultDisplay().getMetrics(dm);String width dm.widthPixels; //宽String height dm.heightPixels; //高//在service中也能得到高和宽WindowManager mWindowManager (WindowManager) getSystemService(Context.WINDOW_SERVICE);width mWindowManager.getDefaultDisplay().getWidth();height mWindowManager.getDefaultDisplay().getHeight();}获取手机MAC地址privateString getMacAddress(){String result ;WifiManager wifiManager (WifiManager) getSystemService(Context.WIFI_SERVICE);WifiInfo wifiInfo wifiManager.getConnectionInfo();result wifiInfo.getMacAddress();Log.i(TAG, macAdd: result);returnresult;}手机CPU信息privateString[] getCpuInfo() {String str1 /proc/cpuinfo;String str2 ;String[] cpuInfo {,};//1-cpu型号 //2-cpu频率String[] arrayOfString;try{FileReader fr newFileReader(str1);BufferedReader localBufferedReader newBufferedReader(fr,8192);str2 localBufferedReader.readLine();arrayOfString str2.split(\\s);for(inti 2; i arrayOfString.length; i) {cpuInfo[0] cpuInfo[0] arrayOfString[i] ;}str2 localBufferedReader.readLine();arrayOfString str2.split(\\s);cpuInfo[1] arrayOfString[2];localBufferedReader.close();} catch(IOException e) {}Log.i(TAG, cpuinfo: cpuInfo[0] cpuInfo[1]);returncpuInfo;}网上收集的一些获取收集信息的代码制作成一个工具类以后可以方便调用。