Skip to content

@capgo/capacitor-proximity

Enable native proximity monitoring so your app can react when the device is held to the ear, covered by a hand, or placed face down.

Capacitor plugin for enabling proximity monitoring in mobile apps.

Simple Control

Turn proximity monitoring on when a flow starts and disable it cleanly when it ends.

Native iOS Behavior

Uses UIDevice.isProximityMonitoringEnabled so iOS handles the screen behavior natively.

Android Sensor Support

Listens to Sensor.TYPE_PROXIMITY and dims the current app window while the sensor is covered.

Availability Checks

Verify whether the current device exposes a usable proximity sensor before enabling the feature.

Version Reporting

Read the native plugin version at runtime for debugging, support, and diagnostics.

Comprehensive Documentation

Check the Getting Started guide to install and integrate the plugin quickly.

  • enable - Enable proximity monitoring.
  • disable - Disable proximity monitoring.
  • getStatus - Get the current sensor availability and plugin enabled state.
MethodDescription
enableEnable proximity monitoring.
disableDisable proximity monitoring.
getStatusGet the current sensor availability and plugin enabled state.
getPluginVersionGet the current native plugin version.

This reference is synced from src/definitions.ts in capacitor-proximity.