TelephonyCallback
public
class
TelephonyCallback
extends Object
java.lang.Object | |
↳ | android.telephony.TelephonyCallback |
A callback class for monitoring changes in specific telephony states on the device, including service state, signal strength, message waiting indicator (voicemail), and others.
To register a callback, use a TelephonyCallback
which implements interfaces regarding
EVENT_*. For example,
FakeServiceStateCallback extends TelephonyCallback
implements
TelephonyCallback.ServiceStateListener
.
Then override the methods for the state that you wish to receive updates for, and
pass the executor and your TelephonyCallback object to
TelephonyManager.registerTelephonyCallback
.
Methods are called when the state changes, as well as once on initial registration.
Note that access to some telephony information is permission-protected. Your application won't receive updates for protected information unless it has the appropriate permissions declared in its manifest file. Where permissions apply, they are noted in the appropriate sub-interfaces.
Summary
Nested classes | |
---|---|
interface |
TelephonyCallback.ActiveDataSubscriptionIdListener
Interface for active data subscription ID listener. |
interface |
TelephonyCallback.BarringInfoListener
Interface for barring information listener. |
interface |
TelephonyCallback.CallDisconnectCauseListener
Interface for call disconnect cause listener. |
interface |
TelephonyCallback.CallForwardingIndicatorListener
Interface for call-forwarding indicator listener. |
interface |
TelephonyCallback.CallStateListener
Interface for call state listener. |
interface |
TelephonyCallback.CarrierNetworkListener
Interface for carrier network listener. |
interface |
TelephonyCallback.CellInfoListener
Interface for cell info listener. |
interface |
TelephonyCallback.CellLocationListener
Interface for device cell location listener. |
interface |
TelephonyCallback.DataActivationStateListener
Interface for SIM data activation state listener. |
interface |
TelephonyCallback.DataActivityListener
Interface for data activity state listener. |
interface |
TelephonyCallback.DataConnectionStateListener
Interface for data connection state listener. |
interface |
TelephonyCallback.DisplayInfoListener
Interface for display info listener. |
interface |
TelephonyCallback.EmergencyNumberListListener
Interface for the current emergency number list listener. |
interface |
TelephonyCallback.ImsCallDisconnectCauseListener
Interface for IMS call disconnect cause listener. |
interface |
TelephonyCallback.MessageWaitingIndicatorListener
Interface for message waiting indicator listener. |
interface |
TelephonyCallback.PhysicalChannelConfigListener
Interface for current physical channel configuration listener. |
interface |
TelephonyCallback.PreciseDataConnectionStateListener
Interface for precise data connection state listener. |
interface |
TelephonyCallback.RegistrationFailedListener
Interface for registration failures listener. |
interface |
TelephonyCallback.ServiceStateListener
Interface for service state listener. |
interface |
TelephonyCallback.SignalStrengthsListener
Interface for network signal strengths listener. |
interface |
TelephonyCallback.UserMobileDataStateListener
Interface for user mobile data state listener. |
Public constructors | |
---|---|
TelephonyCallback()
|
Inherited methods | |
---|---|
Public constructors
TelephonyCallback
public TelephonyCallback ()
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2024-12-18 UTC.