Class AndroidTelephonyIdleIncomingListener
Listens for new incoming call and idle states of the phone. Since it is not easy to differentiate incoming from outgoing calls on the basis of Android.Telephony.CallState values, we also need the AndroidTelephonyOutgoingBroadcastReceiver. The difficulty is caused by the fact that an incoming call will transition to Android.Telephony.CallState.Ringing and then immediately to Android.Telephony.CallState.Offhook, whereas an outgoing call will transition directly to Android.Telephony.CallState.Offhook. We'd rather not have to interpret Android.Telephony.CallState.Offhook differently depending on what the previous state was and how recently it was observed.
Inheritance
System.Object
AndroidTelephonyIdleIncomingListener
Namespace: Sensus.Android.Probes.Communication
Assembly: SensusAndroid.dll
Syntax
public class AndroidTelephonyIdleIncomingListener : PhoneStateListener
Constructors
AndroidTelephonyIdleIncomingListener()
Declaration
public AndroidTelephonyIdleIncomingListener()
Methods
OnCallStateChanged(CallState, String)
Declaration
public override void OnCallStateChanged(CallState state, string phoneNumber)
Parameters
Type | Name | Description |
---|---|---|
Android.Telephony.CallState | state | |
System.String | phoneNumber |
Events
Idle
Declaration
public event EventHandler<string> Idle
Event Type
Type | Description |
---|---|
System.EventHandler<System.String> |
IncomingCall
Declaration
public event EventHandler<string> IncomingCall
Event Type
Type | Description |
---|---|
System.EventHandler<System.String> |