偷偷摘套内射激情视频,久久精品99国产国产精,中文字幕无线乱码人妻,中文在线中文a,性爽19p

Android中獲取手機(jī)信息

移動(dòng)開(kāi)發(fā) Android
之前一篇文章是講述了手機(jī)隱藏的信息,其中也包含了獲取手機(jī)信息的一條語(yǔ)句,不過(guò)本篇詳細(xì)的講述了如何獲取手機(jī)信息。

 Android開(kāi)發(fā)平臺(tái)中,可通過(guò)TelephonyManager 獲取本機(jī)號(hào)碼。

java代碼:

  1. TelephonyManager phoneMgr=(TelephonyManager)this.getSystemService(Context.TELEPHONY_SERVICE);  
  2. txtPhoneNumber.setText(phoneMgr.getLine1Number()); //txtPhoneNumber是一個(gè)EditText 用于顯示手機(jī)號(hào) 

注:根據(jù)Android的安全機(jī)制,在使用TelephonyManager時(shí),必須在AndroidManifest.xml中添加<uses-permission android:name="READ_PHONE_STATE" /> 否則無(wú)法獲得系統(tǒng)的許可。
手機(jī)型號(hào) Build.MODEL

java代碼:

  1. private void loadPhoneStatus(){  
  2.    TelephonyManager phoneMgr=(TelephonyManager)this.getSystemService(Context.TELEPHONY_SERVICE);  
  3.    txtPhoneModel.setText(Build.MODEL); //手機(jī)型號(hào)  
  4.    txtPhoneNumber.setText(phoneMgr.getLine1Number());//本機(jī)電話號(hào)碼  
  5.    txtSdkVersion.setText(Build.VERSION.SDK);//SDK版本號(hào)  
  6.    txtOsVersion.setText(Build.VERSION.RELEASE);//Firmware/OS 版本號(hào)  

 事實(shí)上,Build能向我們提供包括 硬件廠商,硬件編號(hào),序列號(hào)等很多信息 調(diào)用方法也都同上,很簡(jiǎn)單。

Java代碼:

  1. String  
  2. BOARD  
  3. The name of the underlying board, like "goldfish".  
  4.  
  5. String  
  6. BOOTLOADER  
  7. The system bootloader version number.  
  8.  
  9. String  
  10. BRAND  
  11. The brand (e.g., carrier) the software is customized for, if any.  
  12.  
  13. String  
  14. CPU_ABI  
  15. The name of the instruction set (CPU type + ABI convention) of native code.  
  16.  
  17. String  
  18. CPU_ABI2  
  19. The name of the second instruction set (CPU type + ABI convention) of native code.  
  20.  
  21. String  
  22. DEVICE  
  23. The name of the industrial design.  
  24.  
  25. String  
  26. DISPLAY  
  27. A build ID string meant for displaying to the user  
  28.  
  29. String  
  30. FINGERPRINT  
  31. A string that uniquely identifies this build.  
  32.  
  33. String  
  34. HARDWARE  
  35. The name of the hardware (from the kernel command line or /proc).  
  36.  
  37. String  
  38. HOST  
  39.  
  40. String  
  41. ID  
  42. Either a changelist number, or a label like "M4-rc20".  
  43.  
  44. String  
  45. MANUFACTURER  
  46. The manufacturer of the product/hardware.  
  47.  
  48. String  
  49. MODEL  
  50. The end-user-visible name for the end product.  
  51.  
  52. String  
  53. PRODUCT  
  54. The name of the overall product.  
  55.  
  56. String  
  57. RADIO  
  58. The radio firmware version number.  
  59.  
  60. String  
  61. SERIAL  
  62. A hardware serial number, if available.  
  63.  
  64. String  
  65. TAGS  
  66. Comma-separated tags describing the build, like "unsigned,debug".  
  67. long  
  68. TIME  
  69.  
  70. String  
  71. TYPE  
  72. The type of build, like "user" or "eng".  
  73.  
  74. String  
  75. UNKNOWN  
  76. Value used for when a build property is unknown.  
  77.  
  78. String  
  79. USER 

效果圖:

【編輯推薦】

Android UI設(shè)計(jì)模式

Android開(kāi)發(fā)之旅:Android架構(gòu)

Android Phone 7界面設(shè)置小教程

Android系統(tǒng)手機(jī)隱藏代碼大全曝光

Android Activity和Intent機(jī)制學(xué)習(xí)筆記

責(zé)任編輯:zhaolei 來(lái)源: 互聯(lián)網(wǎng)
相關(guān)推薦

2010-08-12 13:11:54

Universal AAndroid開(kāi)發(fā)

2015-05-25 11:04:18

2013-07-02 09:29:52

2011-06-18 10:55:30

中電信摩托羅拉華為

2011-12-21 16:44:00

信息圖手機(jī)進(jìn)化史

2024-03-04 14:59:51

鴻蒙CPU信息C++

2009-11-13 10:53:54

ADO.NET Dat

2021-04-21 09:44:18

LinuxCPUCLI工具

2021-04-13 10:57:02

LinuxCPUCLI

2023-01-31 10:21:00

RobustaKubernetes

2013-03-29 10:24:44

NDK隱藏敏感信息Android

2016-12-12 09:39:40

2011-07-13 10:56:57

2011-08-12 14:00:36

iPhone硬件版本系統(tǒng)信息

2024-04-11 08:26:34

Android系統(tǒng)命令

2012-04-28 09:46:35

2013-01-04 17:44:59

2011-02-16 11:49:06

2024-06-19 08:32:13

2013-03-29 10:47:39

Android獲取經(jīng)緯AndroidGPS定
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)