Android Tutorials for Beginners
Telephony Manager
Telephony Manager provides access to information about the telephony services on the device. Applications can use the methods in this class to determine telephony services and states, as well as to access some types of subscriber information. Applications can also register a listener to receive notification of telephony state changes.You do not instantiate this class directly; instead, you retrieve a reference to an instance through Context.getSystemService(Context.TELEPHONY_SERVICE).
Some More Good Android Topics
Customizing Toast In Android
Showing Toast for Longer Time
Customizing Checkboxes In Android
Customizing Progress Bar
Permission Required:
To work with Telephony Manager and to read the phone details we need
<uses-permission android:name="android.permission.READ_PHONE_STATE"/> permission.So add this permission in your manifest file.
Accessing the Telephony Manager:
TelephonyManager telephonyManager=(TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);
Reading Details of your Phone:
int phoneType = telephonyManager.getPhoneType();
switch (phoneType) {
case (TelephonyManager.PHONE_TYPE_CDMA): break;
case (TelephonyManager.PHONE_TYPE_GSM) : break;
case (TelephonyManager.PHONE_TYPE_NONE): break;
default: break;
}
How to Get IMEI number of the Phone
Getting Network Details
// Get connected network country ISO code
String networkCountry = telephonyManager.getNetworkCountryIso();
// Get the connected network operator ID (MCC + MNC)
String networkOperatorId = telephonyManager.getNetworkOperator();
// Get the connected network operator name
String networkName = telephonyManager.getNetworkOperatorName();
// Get the type of network you are connected with
int networkType = telephonyManager.getNetworkType();
switch (networkType) {
case (TelephonyManager.NETWORK_TYPE_1xRTT) :" Your Code ":
break;
case (TelephonyManager.NETWORK_TYPE_CDMA) :" Your Code ":
break;
case (TelephonyManager.NETWORK_TYPE_EDGE) : " Your Code ":
break;
case (TelephonyManager.NETWORK_TYPE_EVDO_0) :" Your Code ":
break;
Getting SIM Details :
Using the Object of Telephony Manager class we can get the details like SIM Serial number, Country Code, Network Provider code and other Details.
int simState = telephonyManager.getSimState();
switch (simState) {
case (TelephonyManager.SIM_STATE_ABSENT): break;
case (TelephonyManager.SIM_STATE_NETWORK_LOCKED): break;
case (TelephonyManager.SIM_STATE_PIN_REQUIRED): break;
case (TelephonyManager.SIM_STATE_PUK_REQUIRED): break;
case (TelephonyManager.SIM_STATE_UNKNOWN): break;
case (TelephonyManager.SIM_STATE_READY): {
// Get the SIM country ISO code
String simCountry = telephonyManager.getSimCountryIso();
// Get the operator code of the active SIM (MCC + MNC)
String simOperatorCode = telephonyManager.getSimOperator();
// Get the name of the SIM operator
String simOperatorName = telephonyManager.getSimOperatorName();
// -- Requires READ_PHONE_STATE uses-permission --
// Get the SIM’s serial number
String simSerial = telephonyManager.getSimSerialNumber();
}
}
Advance Android Topics
Customizing Toast In Android
Showing Toast for Longer Time
Customizing the Display Time of Toast
Using TimePickerDialog and DatePickerDialog In android
Animating A Button In Android
Populating ListView With DataBase
Customizing Checkboxes In Android
Increasin Size of Checkboxes
Android ProgressBar
Designing For Different Screen Sizes
Handling Keyboard Events
More Android Topics:
Android : Introduction
Eclipse Setup for Android Development
Configuring Eclipse for Android DevelopmentBegging With Android
Creating Your First Android ProjectUnderstanding Android Manifest File of your android app
Working With Layouts
Understanding Layouts in AndroidWorking with Linear Layout (With Example)
Nested Linear Layout (With Example)
Table Layout
Frame Layout(With Example)
Absolute Layout
Grid Layout
Activity
Activity In AndroidActivity Life Cycle
Starting Activity For Result
Sending Data from One Activity to Other in Android
Returning Result from Activity
Working With Views
Using Buttons and EditText in AndroidUsing CheckBoxes in Android
Using AutoCompleteTextView in Android
Grid View
Toast
Customizing Toast In AndroidCustomizing the Display Time of Toast
Customizing Toast At Runtime
Adding Image in Toast
Showing Toast for Longer Time
Dialogs In Android
Working With Alert DialogAdding Radio Buttons In Dialog
Adding Check Boxes In Dialog
Creating Customized Dialogs in Android
Adding EditText in Dialog
Creating Dialog To Collect User Input
DatePicker and TimePickerDialog
Using TimePickerDialog and DatePickerDialog In androidWorking With SMS
How to Send SMS in AndroidHow To Receive SMS
Accessing Inbox In Android
ListView:
Populating ListView With DataBaseMenus In Android
Creating Option MenuCreating Context Menu In Android
TelephonyManager
Using Telephony Manager In AndroidWorking With Incoming Calls
How To Handle Incoming Calls in AndroidHow to Forward an Incoming Call In Android
CALL States In Android
Miscellaneous
Notifications In AndroidHow To Vibrate The Android Phone
Sending Email In Android
Opening a webpage In Browser
How to Access PhoneBook In Android
Prompt User Input with an AlertDialog
Storage: Storing Data In Android
Shared Prefferences In Android
SharedPreferences In AndroidFiles: File Handling In Android
Reading and Writing files to Internal StoarageReading and Writing files to SD Card
DataBase : Working With Database
Working With Database in AndroidCreating Table In Android
Inserting, Deleting and Updating Records In Table in Android
How to Create DataBase in Android
Accessing Inbox In Android
Wow great.This is very informative and effective for me.Sharing here android tutorial apps and games.
ReplyDeletetelephony leased line
Shockingly, relatively few clients comprehend apk mods or set aside some effort to check what authorizations they award.
ReplyDeleteA shared post couldn't be better. Thanks very much.
ReplyDeleteĐặt vé tại phòng vé Aivivu, tham khảo
ReplyDeletevé máy bay đi Mỹ bao nhiêu tiền
vé máy bay mỹ về việt nam
bao giờ có chuyến bay từ đức về việt nam
dịch vụ vé máy bay tại nga
mua vé máy bay từ anh về việt nam
lịch bay từ pháp về việt nam
khách sạn được cách ly tại hà nội
ve may bay cho chuyen gia nuoc ngoai
Because of the prevalence of Androids, there has been a distraught scramble by significant media transmission makers, for example, Samsung and Motorola to coordinate Android refreshes into their items. minecraft servers
ReplyDeleteHi,
ReplyDeleteThanks for sharing the information with us it was very informative. https://hangup.in