@capgo/capacitor-proximity
Overview
Section titled “Overview”@capgo/capacitor-proximity wraps native proximity monitoring so VoIP, voice note, and support call screens can react when the device is near a face or hand. Enable monitoring during a call flow and disable it when the user leaves the screen.
On iOS the plugin toggles UIDevice proximity monitoring. On Android it listens to TYPE_PROXIMITY and dims the window while the sensor is covered.
Platform support
Section titled “Platform support”| Platform | Support | Notes |
|---|---|---|
| iOS | Yes | UIDevice proximity monitoring |
| Android | Yes | Proximity sensor with screen dimming |
| Web | No | Not available |
Core Capabilities
Section titled “Core Capabilities”enable- Enable proximity monitoring.disable- Disable proximity monitoring.getStatus- Get the current sensor availability and plugin enabled state.
Public API
Section titled “Public API”| Method | Description |
|---|---|
enable | Enable proximity monitoring. |
disable | Disable proximity monitoring. |
getStatus | Get the current sensor availability and plugin enabled state. |
getPluginVersion | Get the current native plugin version. |
Source Of Truth
Section titled “Source Of Truth”This reference is synced from src/definitions.ts in capacitor-proximity.
Keep going from @capgo/capacitor-proximity
Section titled “Keep going from @capgo/capacitor-proximity”If you are using @capgo/capacitor-proximity to plan native plugin work, connect it with Using @capgo/capacitor-proximity for the native capability in Using @capgo/capacitor-proximity, Capgo Plugin Directory for the product workflow in Capgo Plugin Directory, Capacitor Plugins by Capgo for the implementation detail in Capacitor Plugins by Capgo, Adding or Updating Plugins for the implementation detail in Adding or Updating Plugins, and Ionic Enterprise Plugin Alternatives for the product workflow in Ionic Enterprise Plugin Alternatives.