Android.Hardware.SensorManager.CancelTriggerSensor Method
Cancels receiving trigger events for a trigger sensor.

Syntax

[Android.Runtime.Register("cancelTriggerSensor", "(Landroid/hardware/TriggerEventListener;Landroid/hardware/Sensor;)Z", "GetCancelTriggerSensor_Landroid_hardware_TriggerEventListener_Landroid_hardware_Sensor_Handler")]
public virtual bool CancelTriggerSensor (TriggerEventListener listener, Sensor sensor)

Parameters

listener
The listener on which the TriggerEventListener.OnTrigger(TriggerEvent) is delivered.It should be the same as the one used in SensorManager.RequestTriggerSensor(TriggerEventListener, Android.Hardware.Sensor)
sensor
The sensor for which the trigger request should be canceled. If null, it cancels receiving trigger for all sensors associated with the listener.

Returns

Documentation for this section has not yet been entered.

Exceptions

TypeReason
Java.Lang.IllegalArgumentExceptionwhen sensor is a trigger sensor.

Remarks

Cancels receiving trigger events for a trigger sensor.

Note that a Trigger sensor will be auto disabled if TriggerEventListener.OnTrigger(TriggerEvent) has triggered. This method is provided in case the user wants to explicitly cancel the request to receive trigger events.

[Android Documentation]

Requirements

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