Ambient Light Sensor Plugin provides OutSystems 11 mobile applications with access to the device's built-in ambient light sensor on Android devices.
The component acts as a lightweight bridge between OutSystems and the native device sensor, allowing applications to determine the amount of light present in the surrounding environment. The measured light intensity is returned in lux (lx) through simple OutSystems Client Actions.
CheckAmbientLightAvailability
Checks whether the device has an accessible ambient light sensor.
Outputs:
IsAvailable
ErrorMessage
GetCurrentLight
Retrieves the current ambient light intensity measured by the device's built-in light sensor.
Lux
IsSuccess
The component can be used for:
This component is intended for OutSystems 11 mobile applications using Cordova and currently supports Android devices only. Availability of the ambient light sensor depends on the device hardware.
This component uses the open-source cordova-plugin-ambient-light plugin as its native Android bridge. The dependency is maintained in a dedicated repository and is distributed under the MIT License.
cordova-plugin-ambient-light
For devices without a supported ambient light sensor, the availability check or light-reading action may return an appropriate error instead of a lux value.