PhoneStateListener Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A listener class for monitoring changes in specific telephony states on the device, including service state, signal strength, message waiting indicator (voicemail), and others.
[Android.Runtime.Register("android/telephony/PhoneStateListener", DoNotGenerateAcw=true)]
public class PhoneStateListener : Java.Lang.Object
[<Android.Runtime.Register("android/telephony/PhoneStateListener", DoNotGenerateAcw=true)>]
type PhoneStateListener = class
inherit Object
- Inheritance
- Attributes
Remarks
A listener class for monitoring changes in specific telephony states on the device, including service state, signal strength, message waiting indicator (voicemail), and others.
Override the methods for the state that you wish to receive updates for, and pass your PhoneStateListener object, along with bitwise-or of the LISTEN_ flags to TelephonyManager#listen TelephonyManager.listen()
. 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 LISTEN_ flags.
This member is deprecated. Use TelephonyCallback
instead.
Java documentation for android.telephony.PhoneStateListener
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Constructors
PhoneStateListener() |
Create a PhoneStateListener for the Phone with the default subscription. |
PhoneStateListener(IExecutor) |
Create a PhoneStateListener for the Phone using the specified Executor |
PhoneStateListener(IntPtr, JniHandleOwnership) |
A constructor used when creating managed representations of JNI objects; called by the runtime. |
Fields
ListenBarringInfo |
Listen for Barring Information for the current registered / camped cell. |
ListenCallDisconnectCauses |
Listen for call disconnect causes which contains |
ListenDisplayInfoChanged |
Listen for display info changed event. |
ListenImsCallDisconnectCauses |
Listen for IMS call disconnect causes which contains
|
ListenPreciseDataConnectionState |
Listen for |
ListenRegistrationFailure |
Listen for Registration Failures. |
Properties
Class |
Returns the runtime class of this |
Handle |
The handle to the underlying Android instance. (Inherited from Object) |
JniIdentityHashCode | (Inherited from Object) |
JniPeerMembers | |
PeerReference | (Inherited from Object) |
ThresholdClass |
This API supports the Mono for Android infrastructure and is not intended to be used directly from your code. |
ThresholdType |
This API supports the Mono for Android infrastructure and is not intended to be used directly from your code. |
Methods
Clone() |
Creates and returns a copy of this object. (Inherited from Object) |
Dispose() | (Inherited from Object) |
Dispose(Boolean) | (Inherited from Object) |
Equals(Object) |
Indicates whether some other object is "equal to" this one. (Inherited from Object) |
GetHashCode() |
Returns a hash code value for the object. (Inherited from Object) |
JavaFinalize() |
Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. (Inherited from Object) |
Notify() |
Wakes up a single thread that is waiting on this object's monitor. (Inherited from Object) |
NotifyAll() |
Wakes up all threads that are waiting on this object's monitor. (Inherited from Object) |
OnActiveDataSubscriptionIdChanged(Int32) |
Callback invoked when active data subId changes. |
OnBarringInfoChanged(BarringInfo) |
Report updated barring information for the current camped/registered cell. |
OnCallDisconnectCauseChanged(Int32, Int32) |
Callback invoked when call disconnect cause changes on the registered subscription. |
OnCallForwardingIndicatorChanged(Boolean) |
Callback invoked when the call-forwarding indicator changes on the registered subscription. |
OnCallStateChanged(CallState, String) |
Callback invoked when device call state changes. |
OnCellInfoChanged(IList<CellInfo>) |
Callback invoked when a observed cell info has changed or new cells have been added or removed on the registered subscription. |
OnCellLocationChanged(CellLocation) |
Callback invoked when device cell location changes on the registered subscription. |
OnDataActivity(DataActivity) |
Callback invoked when data activity state changes on the registered subscription. |
OnDataConnectionStateChanged(DataConnectionStatus, NetworkType) |
same as above, but with the network type. |
OnDataConnectionStateChanged(DataConnectionStatus) |
Callback invoked when connection state changes on the registered subscription. |
OnDisplayInfoChanged(TelephonyDisplayInfo) |
Callback invoked when the display info has changed on the registered subscription. |
OnEmergencyNumberListChanged(IDictionary<Integer,IList<EmergencyNumber>>) |
Callback invoked when the current emergency number list has changed on the registered subscription. |
OnImsCallDisconnectCauseChanged(ImsReasonInfo) |
Callback invoked when Ims call disconnect cause changes on the registered subscription. |
OnMessageWaitingIndicatorChanged(Boolean) |
Callback invoked when the message-waiting indicator changes on the registered subscription. |
OnPreciseDataConnectionStateChanged(PreciseDataConnectionState) |
Callback providing update about the default/internet data connection on the registered subscription. |
OnRegistrationFailed(CellIdentity, String, Int32, Int32, Int32) |
Report that Registration or a Location/Routing/Tracking Area update has failed. |
OnServiceStateChanged(ServiceState) |
Callback invoked when device service state changes on the registered subscription. |
OnSignalStrengthChanged(Int32) |
Obsolete.
Callback invoked when network signal strength changes on the registered subscription. |
OnSignalStrengthsChanged(SignalStrength) |
Callback invoked when network signal strengths changes on the registered subscription. |
OnUserMobileDataStateChanged(Boolean) |
Callback invoked when the user mobile data state has changed on the registered subscription. |
SetHandle(IntPtr, JniHandleOwnership) |
Sets the Handle property. (Inherited from Object) |
ToArray<T>() | (Inherited from Object) |
ToString() |
Returns a string representation of the object. (Inherited from Object) |
UnregisterFromRuntime() | (Inherited from Object) |
Wait() |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>. (Inherited from Object) |
Wait(Int64, Int32) |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed. (Inherited from Object) |
Wait(Int64) |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed. (Inherited from Object) |
Explicit Interface Implementations
IJavaPeerable.Disposed() | (Inherited from Object) |
IJavaPeerable.DisposeUnlessReferenced() | (Inherited from Object) |
IJavaPeerable.Finalized() | (Inherited from Object) |
IJavaPeerable.JniManagedPeerState | (Inherited from Object) |
IJavaPeerable.SetJniIdentityHashCode(Int32) | (Inherited from Object) |
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) | (Inherited from Object) |
IJavaPeerable.SetPeerReference(JniObjectReference) | (Inherited from Object) |
Extension Methods
JavaCast<TResult>(IJavaObject) |
Performs an Android runtime-checked type conversion. |
JavaCast<TResult>(IJavaObject) | |
GetJniTypeName(IJavaPeerable) |