Android TelephonyManager TutorialThe android.telephony.TelephonyManager class provides information about the telephony services such as subscriber id, sim serial number, phone network type etc. Moreover, you can determine the phone state etc. Android TelephonyManager ExampleLet's see the simple example of TelephonyManager that prints information of the telephony services. activity_main.xmlDrag one textview from the pallete, now the xml file will look like this. File: activity_main.xml
Activity classNow, write the code to display the information about the telephony services. File: MainActivity.java
AndroidManifest.xmlYou need to provide READ_PHONE_STATE permission in the AndroidManifest.xml file. File: AndroidManifest.xml
Output:![]()
Next TopicAndroid Call State Example
|
JavaTpoint offers too many high quality services. Mail us on h[email protected], to get more information about given services.
JavaTpoint offers college campus training on Core Java, Advance Java, .Net, Android, Hadoop, PHP, Web Technology and Python. Please mail your requirement at [email protected].
Duration: 1 week to 2 week