Java android.telephony TelephonyManager fields, constructors, methods, implement or subclass

Example usage for Java android.telephony TelephonyManager fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for android.telephony TelephonyManager.

The text is from its open source code.

Field

StringACTION_PHONE_STATE_CHANGED
Broadcast intent action indicating that the call state on the device has changed.
StringACTION_RESPOND_VIA_MESSAGE
The Phone app sends this intent when a user opts to respond-via-message during an incoming call.
StringEXTRA_STATE
The lookup key used with the #ACTION_PHONE_STATE_CHANGED broadcast for a String containing the new call state.
StringEXTRA_STATE_IDLE
Value used with #EXTRA_STATE corresponding to #CALL_STATE_IDLE .
StringEXTRA_STATE_RINGING
Value used with #EXTRA_STATE corresponding to #CALL_STATE_RINGING .
StringEXTRA_STATE_OFFHOOK
Value used with #EXTRA_STATE corresponding to #CALL_STATE_OFFHOOK .
StringEXTRA_INCOMING_NUMBER
Extra key used with the #ACTION_PHONE_STATE_CHANGED broadcast for a String containing the incoming or outgoing phone number.
intPHONE_TYPE_NONE
No phone radio.
intPHONE_TYPE_GSM
Phone radio is GSM.
intPHONE_TYPE_CDMA
Phone radio is CDMA.
intPHONE_TYPE_SIP
Phone is via SIP.
intNETWORK_TYPE_UNKNOWN
Network type is unknown
intNETWORK_TYPE_GPRS
Current network is GPRS
intNETWORK_TYPE_EDGE
Current network is EDGE
intNETWORK_TYPE_UMTS
Current network is UMTS
intNETWORK_TYPE_CDMA
Current network is CDMA: Either IS95A or IS95B
intNETWORK_TYPE_EVDO_0
Current network is EVDO revision 0
intNETWORK_TYPE_EVDO_A
Current network is EVDO revision A
intNETWORK_TYPE_1xRTT
Current network is 1xRTT
intNETWORK_TYPE_HSDPA
Current network is HSDPA
intNETWORK_TYPE_HSUPA
Current network is HSUPA
intNETWORK_TYPE_HSPA
Current network is HSPA
intNETWORK_TYPE_IDEN
Current network is iDen
intNETWORK_TYPE_EVDO_B
Current network is EVDO revision B
intNETWORK_TYPE_LTE
Current network is LTE
intNETWORK_TYPE_EHRPD
Current network is eHRPD
intNETWORK_TYPE_HSPAP
Current network is HSPA+
intNETWORK_TYPE_GSM
Current network is GSM
intNETWORK_TYPE_TD_SCDMA
Current network is TD_SCDMA
intNETWORK_TYPE_IWLAN
Current network is IWLAN
intSIM_STATE_UNKNOWN
SIM card state: Unknown.
intSIM_STATE_ABSENT
SIM card state: no SIM card is available in the device
intSIM_STATE_PIN_REQUIRED
SIM card state: Locked: requires the user's SIM PIN to unlock
intSIM_STATE_PUK_REQUIRED
SIM card state: Locked: requires the user's SIM PUK to unlock
intSIM_STATE_NETWORK_LOCKED
SIM card state: Locked: requires a network PIN to unlock
intSIM_STATE_READY
SIM card state: Ready
intCALL_STATE_IDLE
Device call state: No activity.
intCALL_STATE_RINGING
Device call state: Ringing.
intCALL_STATE_OFFHOOK
Device call state: Off-hook.
intDATA_ACTIVITY_NONE
Data connection activity: No traffic.
intDATA_ACTIVITY_IN
Data connection activity: Currently receiving IP PPP traffic.
intDATA_ACTIVITY_OUT
Data connection activity: Currently sending IP PPP traffic.
intDATA_ACTIVITY_INOUT
Data connection activity: Currently both sending and receiving IP PPP traffic.
intDATA_ACTIVITY_DORMANT
Data connection is active, but physical link is down
intDATA_DISCONNECTED
Data connection state: Disconnected.
intDATA_CONNECTING
Data connection state: Currently setting up a data connection.
intDATA_CONNECTED
Data connection state: Connected.
intDATA_SUSPENDED
Data connection state: Suspended.

Method

TelephonyManagerfrom(Context context)
ListgetAllCellInfo()
Requests all available cell information from all radios on the device including the camped/registered, serving, and neighboring cells.
intgetCallState()
Returns the state of all calls on the device.
CellLocationgetCellLocation()
Returns the current location of the device.
ClassgetClass()
Returns the runtime class of this Object .
intgetDataActivity()
Returns a constant indicating the type of activity on a data connection (cellular).
intgetDataState()
Returns a constant indicating the current data connection state (cellular).
TelephonyManagergetDefault()
StringgetDeviceId()
Returns the unique device ID, for example, the IMEI for GSM and the MEID or ESN for CDMA phones.
StringgetDeviceSoftwareVersion()
Returns the software version number for the device, for example, the IMEI/SV for GSM phones.
StringgetLine1AlphaTag()
Returns the alphabetic identifier associated with the line 1 number.
StringgetLine1Number()
Returns the phone number string for line 1, for example, the MSISDN for a GSM phone.
ListgetNeighboringCellInfo()
Returns the neighboring cell information of the device.
StringgetNetworkCountryIso()
Returns the ISO-3166 country code equivalent of the MCC (Mobile Country Code) of the current registered operator or the cell nearby, if available.
StringgetNetworkOperator()
Returns the numeric name (MCC+MNC) of current registered operator.
StringgetNetworkOperatorName()
Returns the alphabetic name of current registered operator.
intgetNetworkType()
Return the current data network type.
intgetPhoneCount()
Returns the number of phones available.
intgetPhoneType()
Returns a constant indicating the device phone type.
intgetSimCount()
StringgetSimCountryIso()
Returns the ISO-3166 country code equivalent for the SIM provider's country code.
StringgetSimOperator()
Returns the MCC+MNC (mobile country code + mobile network code) of the provider of the SIM.
StringgetSimOperatorName()
Returns the Service Provider Name (SPN).
StringgetSimSerialNumber()
Returns the serial number of the SIM, if applicable.
intgetSimState()
Returns a constant indicating the state of the default SIM card.
intgetSimState(int slotIndex)
Returns a constant indicating the state of the device SIM card in a slot.
intgetSubIdForPhoneAccount(PhoneAccount phoneAccount)
Returns the subscription ID for the given phone account.
StringgetSubscriberId()
Returns the unique subscriber ID, for example, the IMSI for a GSM phone.
StringgetVoiceMailAlphaTag()
Retrieves the alphabetic identifier associated with the voice mail number.
StringgetVoiceMailNumber()
Returns the voice mail number.
booleanhasIccCard()
booleanisNetworkRoaming()
Returns true if the device is considered roaming on the current network, for GSM purposes.
booleanisVoiceCapable()
voidlisten(PhoneStateListener listener, int events)
Registers a listener object to receive notification of changes in specified telephony states.