Android Setup
Copy a setup prompt with the install steps and the full markdown guide for this plugin.
Android native system used
Section titled “Android native system used”On Android, this plugin uses Jetpack UWB from androidx.core.uwb.
Requirements
Section titled “Requirements”- Android 12+
- Device with UWB hardware
- UWB enabled in system settings
Manifest and permissions
Section titled “Manifest and permissions”The plugin declares:
<uses-permission android:name="android.permission.UWB_RANGING" /><uses-feature android:name="android.hardware.uwb" android:required="false" />No additional manifest changes are required in most apps.
Controller flow
Section titled “Controller flow”import { CapacitorUwb } from '@capgo/capacitor-uwb';
const controller = await CapacitorUwb.startControllerSession();
// Share controller.rangingParameters and controller.localAddress out-of-bandIf you already know the controlee address, pass it when starting the controller session:
await CapacitorUwb.startControllerSession({ peerAddress: '<controlee-address-base64>',});Controlee flow
Section titled “Controlee flow”await CapacitorUwb.startControleeSession({ rangingParameters: { sessionId: 12345, sessionKeyInfo: '<base64>', complexChannel: { channel: 9, preambleIndex: 10 }, peerAddress: '<controller-address-base64>', },});Events
Section titled “Events”rangingUpdateemits distance and angle measurements when available.sessionStateChangedemits lifecycle states such asrunning,invalidated, andpeerDisconnected.
startControllerSession()andstartControleeSession()are Android-only APIs.- The plugin does not provide BLE or backend transport for exchanging ranging parameters.