Android.Telephony.TelephonyManager.Listen Method
Registers a listener object to receive notification of changes in specified telephony states.

Syntax

[Android.Runtime.Register("listen", "(Landroid/telephony/PhoneStateListener;I)V", "GetListen_Landroid_telephony_PhoneStateListener_IHandler")]
public virtual void Listen (PhoneStateListener listener, [Android.Runtime.GeneratedEnum] PhoneStateListenerFlags events)

Parameters

listener
The Android.Telephony.PhoneStateListener object to register (or unregister)
events
The telephony state(s) of interest to the listener, as a bitwise-OR combination of Android.Telephony.PhoneStateListener LISTEN_ flags.

Remarks

Registers a listener object to receive notification of changes in specified telephony states.

To register a listener, pass a Android.Telephony.PhoneStateListener and specify at least one telephony state of interest in the events argument. At registration, and when a specified telephony state changes, the telephony manager invokes the appropriate callback method on the listener object and passes the current (updated) values.

To unregister a listener, pass the listener object and set the events argument to PhoneStateListener.LISTEN_NONE (0).

[Android Documentation]

Requirements

Namespace: Android.Telephony
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1