What information does TelephonyManager have?

Source: Internet
Author: User

This is information on the simulator: [plain] 01-29 02:42:41. 962: V/PhoneInfo (1002): DeviceID = 000000000000000 01-29 02:42:41. 992: V/PhoneInfo (1002): DeviceSoftwareVer = null 01-29 02:42:41. 992: V/PhoneInfo (1002): Line1Number = 15555215554 01-29 02:42:41. 992: V/PhoneInfo (1002): NetworkCountryIso = us 01-29 02:42:41. 992: V/PhoneInfo (1002): NetworkOperator = 310260 01-29 02:42:41. 992: V/PhoneInfo (1002): NetworkOperatorName = Android 01-29 02:42:41. 992: V/PhoneInfo (1002): NetworkType = 3 01-29 02:42:41. 992: V/PhoneInfo (1002): PhoneType = 1 01-29 02:42:42. 002: V/PhoneInfo (1002): SimCountryIso = us 01-29 02:42:42. 002: V/PhoneInfo (1002): SimOperator = 310260 01-29 02:42:42. 002: V/PhoneInfo (1002): SimOperatorName = Android 01-29 02:42:42. 002: V/PhoneInfo (1002): SimSerialNumber = 89014103211118510720 01-29 02:42:42. 002: V/PhoneInfo (1002): SimState = 5 01-29 02:42:42. 002: V/PhoneInfo (1002): SubscriberId = 310260000000000 01-29 02:42:42. 002: V/PhoneInfo (1002): VoiceMailAlphaTag = Voicemail 01-29 02:42:42. 002: V/PhoneInfo (1002): VoiceMailNumber = + 15552175049 01-29 02:42:42. 002: V/PhoneInfo (1002): ------------------------------------------------------------------ 01-29 02:42:42. 002: V/PhoneInfo (1002): Build. VERSION. codename = REL 01-29 02:42:42. 002: V/PhoneInfo (1002): Build. VERSION. incremental = 43546 01-29 02:42:42. 012: V/PhoneInfo (1002): Build. VERSION. release = 2.2 01-29 02:42:42. 012: V/PhoneInfo (1002): Build. VERSION. sdkInt = 8 01-29 02:42:42. 012: V/PhoneInfo (1002): Build. device = generic 01-29 02:42:42. 012: V/PhoneInfo (1002): Build. display = google_sdk-eng 2.2 FRF91 43546 test-keys 01-29 02:42:42. 022: V/PhoneInfo (1002): Build. fingerprint = generic/google_sdk/generic/: 2.2/FRF91/43546: eng/test-keys 01-29 02:42:42. 022: V/PhoneInfo (1002): Build. hardware = goldfish 01-29 02:42:42. 022: V/PhoneInfo (1002): Build. host = e-honda.mtv.corp.google.com 01-29 02:42:42. 022: V/PhoneInfo (1002): Build. ID = FRF91 01-29 02:42:42. 022: V/PhoneInfo (1002): Build. manufacturer = unknown 01-29 02:42:42. 022: V/PhoneInfo (1002): Build. model = google_sdk 01-29 02:42:42. 022: V/PhoneInfo (1002): Build. product = google_sdk 01-29 02:42:42. 022: V/PhoneInfo (1002): Build. type = eng 01-29 02:42:42. 033: V/PhoneInfo (1002): Build. user = android-build: [plain] 01-29 10:44:11. 319: V/PhoneInfo (15919): DeviceID = 35651304127 ***** 01-29 10:44:11. 319: V/PhoneInfo (15919): DeviceSoftwareVer = 356513041279 ***** 01-29 10:44:11. 319: V/PhoneInfo (15919): Line1Number = 01-29 10:44:11. 319: V/PhoneInfo (15919): NetworkCountryIso = cn 01-29 10:44:11. 319: V/PhoneInfo (15919): NetworkOperator = 46000 01-29 10:44:11. 319: V/PhoneInfo (15919): NetworkOperatorName = China Mobile 01-29 10:44:11. 319: V/PhoneInfo (15919): NetworkType = 2 01-29 10:44:11. 319: V/PhoneInfo (15919): PhoneType = 1 01-29 10:44:11. 319: V/PhoneInfo (15919): SimCountryIso = cn 01-29 10:44:11. 319: V/PhoneInfo (15919): SimOperator = 46000 01-29 10:44:11. 319: V/PhoneInfo (15919): SimOperatorName = 01-29 10:44:11. 319: V/PhoneInfo (15919): SimSerialNumber = 8986008019031505 ***** 01-29 10:44:11. 319: V/PhoneInfo (15919): SimState = 5 01-29 10:44:11. 319: V/PhoneInfo (15919): SubscriberId = 46000886810 ***** 01-29 10:44:11. 319: V/PhoneInfo (15919): VoiceMailAlphaTag = voicemail 01-29 10:44:11. 319: V/PhoneInfo (15919): VoiceMailNumber = null 01-29 10:44:11. 319: V/PhoneInfo (15919): ------------------------------------------------------------------ 01-29 10:44:11. 319: V/PhoneInfo (15919): Build. VERSION. codename = REL 01-29 10:44:11. 319: V/PhoneInfo (15919): Build. VERSION. incremental = 1318359360 01-29 10:44:11. 319: V/PhoneInfo (15919): Build. VERSION. release = 2.3.6 01-29 10:44:11. 319: V/PhoneInfo (15919): Build. VERSION. sdkInt = 10 01-29 10:44:11. 319: V/PhoneInfo (15919): Build. device = umts_jordan 01-29 10:44:11. 319: V/PhoneInfo (15919): Build. display = 4.5.1-134_dfp-000001-29 10:44:11. 319: V/PhoneInfo (15919): Build. fingerprint = MOTO/MB526_RTNORD/umts_jordan: 2.3.6/4.5.1-134_dfp-restart/1318359360: user/release-keys 01-29 10:44:11. 319: V/PhoneInfo (15919): Build. hardware = mapphone_umts 01-29 10:44:11. 319: V/PhoneInfo (15919): Build. host = il93lnxdroid54 01-29 10:44:11. 319: V/PhoneInfo (15919): Build. ID = 4.5.1-134_dfp-51101-29 10:44:11. 319: V/PhoneInfo (15919): Build. manufacturer = motorola 01-29 10:44:11. 342: V/PhoneInfo (15919): Build. model = MB526 01-29 10:44:11. 342: V/PhoneInfo (15919): Build. product = MB526_RTNORD 01-29 10:44:11. 342: V/PhoneInfo (15919): Build. type = user 01-29 10:44:11. 342: V/PhoneInfo (15919): Build. user = hudsoncm this is the program code (MainActivity. java): [java] package com. example. phoneinfo; import java. util. arrayList; import java. util. list; import android. OS. bundle; import android. app. activity; import android. content. context; import android. OS. build; import android. telephony. telephonyManager; import android. util. log; import android. view. menu; import android. widget. arrayAdapter; import android. widget. listView; public class MainActivity extends Activity {@ Override protected void onCreate (Bundle savedInstanceState) {super. onCreate (savedInstanceState); setContentView (R. layout. activity_main); initInfoList () ;}@ Override public boolean onCreateOptionsMenu (Menu menu) {getMenuInflater (). inflate (R. menu. activity_main, menu); return true;} private void initInfoList () {www.2cto.com TelephonyManager tm = (TelephonyManager) getSystemService (Context. TELEPHONY_SERVICE); List <String> infos = new ArrayList <String> (); infos. add ("DeviceID =" + tm. getDeviceId (); infos. add ("DeviceSoftwareVer =" + tm. getDeviceSoftwareVersion (); infos. add ("Line1Number =" + tm. getLine1Number (); infos. add ("NetworkCountryIso =" + tm. getNetworkCountryIso (); infos. add ("NetworkOperator =" + tm. getNetworkOperator (); infos. add ("NetworkOperatorName =" + tm. getNetworkOperatorName (); infos. add ("NetworkType =" + tm. getNetworkType (); infos. add ("PhoneType =" + tm. getPhoneType (); infos. add ("SimCountryIso =" + tm. getSimCountryIso (); infos. add ("SimOperator =" + tm. getSimOperator (); infos. add ("SimOperatorName =" + tm. getSimOperatorName (); infos. add ("SimSerialNumber =" + tm. getSimSerialNumber (); infos. add ("SimState =" + tm. getSimState (); infos. add ("SubscriberId =" + tm. getSubscriberId (); infos. add ("VoiceMailAlphaTag =" + tm. getVoiceMailAlphaTag (); infos. add ("VoiceMailNumber =" + tm. getVoiceMailNumber (); infos. add ("------------------------------------------------------------------"); infos. add ("Build. VERSION. codename = "+ Build. VERSION. CODENAME); infos. add ("Build. VERSION. incremental = "+ Build. VERSION. INCREMENTAL); infos. add ("Build. VERSION. release = "+ Build. VERSION. RELEASE); infos. add ("Build. VERSION. sdkInt = "+ Build. VERSION. SDK_INT); infos. add ("Build. device = "+ Build. DEVICE); infos. add ("Build. display = "+ Build. DISPLAY); infos. add ("Build. fingerprint = "+ Build. FINGERPRINT); infos. add ("Build. hardware = "+ Build. HARDWARE); infos. add ("Build. host = "+ Build. HOST); infos. add ("Build. ID = "+ Build. ID); infos. add ("Build. manufacturer = "+ Build. MANUFACTURER); infos. add ("Build. model = "+ Build. MODEL); infos. add ("Build. product = "+ Build. PRODUCT); infos. add ("Build. type = "+ Build. TYPE); infos. add ("Build. user = "+ Build. USER); ListView listView = (ListView) findViewById (R. id. infoListView); listView. setAdapter (new ArrayAdapter <String> (this, android. r. layout. simple_list_item_2, android. r. id. text2, infos); for (String line: infos) Log. v ("PhoneInfo", line) ;}} to run the program properly, it must be in Manifest. xml with permissions: <uses-permission android: name = "android. permission. READ_PHONE_STATE "/>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.