EnxProximitySensor manages functions related to the “Proximity Sensor”. On most device, the Proximity Sensor is implemented as a boolean-sensor.
- It returns just two values
NEARorFAR. - Thresholding is done on the LUX value i.e. the LUX value of the light Sensor is compared with a threshold.
- A LUX-value more than the threshold means the Proximity Sensor returns
FAR. - Anything less than the threshold value, the Sensor returns
NEAR
Method: static Future<void> enableProximitySensor (bool isEnabled)
Parameters: @param bool isEnabled – Boolean. true to enable and false to disable Proximity Sensor.
EnxRtc.enableProximitySensor(true); // Enable Sensor
