Using @capgo/capacitor-proximity
Capacitor plugin for enabling proximity monitoring in mobile apps.
Install
bun add @capgo/capacitor-proximity
bunx cap sync
bunx cap sync copies the plugin's native code into your native projects. Run it again after every plugin upgrade.
Import
import { CapacitorProximity } from '@capgo/capacitor-proximity';
API at a glance
| Method | Description |
|---|---|
enable |
Enable proximity monitoring. |
disable |
Disable proximity monitoring. |
getStatus |
Get the current sensor availability and plugin enabled state. |
Examples
enable()
Enable proximity monitoring.
import { CapacitorProximity } from '@capgo/capacitor-proximity';
await CapacitorProximity.enable();
disable()
Disable proximity monitoring.
import { CapacitorProximity } from '@capgo/capacitor-proximity';
await CapacitorProximity.disable();
getStatus()
Get the current sensor availability and plugin enabled state.
import { CapacitorProximity } from '@capgo/capacitor-proximity';
const status = await CapacitorProximity.getStatus();
Full reference
Keep going from Using @capgo/capacitor-proximity
If you are using Using @capgo/capacitor-proximity to plan native plugin work, connect it with @capgo/capacitor-proximity for the implementation detail in @capgo/capacitor-proximity, Getting Started for the implementation detail in Getting Started, Capgo Plugin Directory for the product workflow in Capgo Plugin Directory, Capacitor Plugins by Capgo for the implementation detail in Capacitor Plugins by Capgo, and Adding or Updating Plugins for the implementation detail in Adding or Updating Plugins.