proximity-sensor-plugin
Mobile icon

Proximity Sensor Plugin

Stable version 1.0.0 (Compatible with OutSystems 11)
Uploaded
 on 7 Sep (10 hours ago)
 by 
0.0
 (0 ratings)
proximity-sensor-plugin

Proximity Sensor Plugin

Details
A mobile plugin that provides access to the device's proximity sensor. It allows applications to check sensor availability, enable or disable proximity monitoring, and retrieve the current proximity state. The plugin can be used to detect whether an object is near the device's proximity sensor.
Read more

Proximity Sensor Plugin is a reusable OutSystems 11 mobile plugin that provides access to the device's proximity sensor. It allows mobile applications to check proximity sensor availability, enable or disable the sensor, and retrieve the current proximity state.

The plugin is useful for mobile scenarios where an application needs to detect whether an object is near the device's proximity sensor. For example, proximity detection can be used in applications that need to respond to the physical presence of an object near the device.

Features

  • Check whether the proximity sensor plugin is available on the device.
  • Enable the device proximity sensor.
  • Disable the device proximity sensor.
  • Retrieve the current proximity state.
  • Detect whether an object is near or far from the proximity sensor.
  • Supports Android and iOS through the underlying Cordova plugin.
  • Provides simple Client Actions that can be consumed by OutSystems mobile applications.

Available Client Actions

CheckProximityAvailability
Checks whether the proximity sensor plugin is available in the current mobile application and returns an availability status.

EnableProximitySensor
Enables the device proximity sensor and starts proximity monitoring.

DisableProximitySensor
Disables the device proximity sensor and stops proximity monitoring.

GetProximityState
Retrieves the current proximity state and indicates whether an object is detected near the proximity sensor.

Proximity State

The proximity state is returned as a Boolean value:

  • True — An object is detected near the proximity sensor.
  • False — No object is detected near the proximity sensor.

Typical Usage

A typical implementation can follow these steps:

  1. Check whether the proximity sensor is available.
  2. Enable the proximity sensor.
  3. Retrieve the current proximity state when required.
  4. Use the returned state to implement the required application behavior.
  5. Disable the proximity sensor when proximity monitoring is no longer required.

Applications can periodically call GetProximityState when they need to monitor proximity changes.

Platform Support

The underlying Cordova plugin supports:

  • Android
  • iOS

The component has been tested on Android. iOS support is provided by the underlying Cordova plugin and should be validated on the target iOS environment before production use.

Device Behavior

When the proximity sensor detects an object nearby, the device may automatically dim the screen or change screen interaction behavior. This behavior is controlled by the device's operating system and may vary depending on the device and platform.

Demo Application

A demo application is included to demonstrate how to check sensor availability, enable and disable the proximity sensor, and retrieve the current proximity state on a mobile device.

Requirements

This component is intended for OutSystems 11 mobile applications running on physical devices with a supported proximity sensor. Proximity sensor availability and behavior may vary depending on the device hardware and operating system.

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