Android.Hardware.SensorManager.RequestTriggerSensor Method
Requests receiving trigger events for a trigger sensor.

Syntax

[Android.Runtime.Register("requestTriggerSensor", "(Landroid/hardware/TriggerEventListener;Landroid/hardware/Sensor;)Z", "GetRequestTriggerSensor_Landroid_hardware_TriggerEventListener_Landroid_hardware_Sensor_Handler")]
public virtual bool RequestTriggerSensor (TriggerEventListener listener, Sensor sensor)

Parameters

listener
The listener on which the TriggerEventListener.OnTrigger(TriggerEvent) will be delivered.
sensor
The sensor to be enabled.

Returns

Documentation for this section has not yet been entered.

Exceptions

TypeReason
Java.Lang.IllegalArgumentExceptionwhen sensor is null or not a trigger sensor.

Remarks

Requests receiving trigger events for a trigger sensor.

When the sensor detects a trigger event condition, such as significant motion in the case of the Sensor.TYPE_SIGNIFICANT_MOTION, the provided trigger listener will be invoked once and then its request to receive trigger events will be canceled. To continue receiving trigger events, the application must request to receive trigger events again.

[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