ambient-light-sensor-plugin
Mobile icon

Ambient Light Sensor Plugin

Stable version 1.0.0 (Compatible with OutSystems 11)
Uploaded
 on 21 Sep (9 hours ago)
 by 
0.0
 (0 ratings)
ambient-light-sensor-plugin

Ambient Light Sensor Plugin

Details
Ambient Light Sensor Plugin provides OutSystems 11 mobile applications with access to the device's built-in ambient light sensor on Android devices. It allows applications to check sensor availability and retrieve the current surrounding light intensity in lux (lx) through simple Client Actions. The component provides a lightweight bridge between OutSystems applications and the device's native ambient light sensor, enabling use cases such as light-level monitoring, context-aware experiences, adaptive interfaces, and other sensor-driven mobile scenarios.
Read more

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.

Features

  • Check whether an ambient light sensor is available on the device.
  • Retrieve the current ambient light intensity in lux (lx).
  • Use the sensor reading directly from OutSystems Client Actions without requiring application developers to implement native Android code.
  • Handle unavailable sensors and reading errors through clear success and error outputs.

Available Client Actions

CheckAmbientLightAvailability

Checks whether the device has an accessible ambient light sensor.

Outputs:

  • IsAvailable — Indicates whether an ambient light sensor is available.
  • ErrorMessage — Provides error information when the sensor is unavailable or the availability check fails.

GetCurrentLight

Retrieves the current ambient light intensity measured by the device's built-in light sensor.

Outputs:

  • Lux — Current ambient light intensity measured in lux (lx).
  • IsSuccess — Indicates whether the reading was retrieved successfully.
  • ErrorMessage — Provides error information when the reading cannot be retrieved.

Use Cases

The component can be used for:

  • Light-level monitoring
  • Context-aware mobile applications
  • Environment-aware user experiences
  • Adaptive application behavior based on surrounding light
  • Accessibility and usability scenarios
  • Sensor-driven mobile applications

Platform Support

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.

Third-Party Dependency

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.

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.

Release notes (1.0.0)
License (1.0.0)
Reviews (0)
Team
Other assets in this category