Guide
UWB 튜토리얼
@capgo/capacitor-uwb 사용하기
Capacitor UWB 플러그인
설치
bun add @capgo/capacitor-uwb
bunx cap sync
이 플러그인은 다음을 제공합니다.
isAvailable- UWB가 지원되고 현재 사용 가능한지 확인합니다.getDiscoveryToken- iOS에서 근접 상호 작용 발견 토큰을 가져옵니다.startPeerSession- iOS에서 peer ranging 세션을 시작하세요.startControllerSession- Android 컨트롤러 세션을 시작하고 공유할 수 있는 매개변수를 반환하세요.startControleeSession- Android 컨트롤러 세션에서 매개변수를 사용하여 컨트롤러 세션을 시작하세요.stopSession- 활성 ranging 세션을 중지하세요.
- 예시 사용
- 사용 가능 여부 확인
import { CapacitorUwb } from '@capgo/capacitor-uwb';
const availability = await CapacitorUwb.isAvailable();
- iOS peer ranging
const { discoveryToken } = await CapacitorUwb.getDiscoveryToken();
await CapacitorUwb.startPeerSession({
peerDiscoveryToken: '<peer-token-base64>',
});
- Android controller / controlee
const controller = await CapacitorUwb.startControllerSession();
await CapacitorUwb.startControleeSession({
rangingParameters: controller.rangingParameters,
});
- 전체 참조
- - GitHub: https://github.com/Cap-go/capacitor-uwb/
- - 문서: /docs/plugins/uwb/
Using @capgo/capacitor-uwb
만약 __CAPGO_KEEP_0__을 사용하고 있다면 Using @capgo/capacitor-uwb __CAPGO_KEEP_0__을 native 플러그인 작업을 계획하기 위해 연결하세요. @capgo/capacitor-uwb for the implementation detail in @capgo/capacitor-uwb, Getting Started Getting Started의 구현 세부 정보를 참조하세요. Capgo 플러그인 디렉토리 Capgo 플러그인 디렉토리의 제품 워크플로우를 참조하세요. Capacitor Plugins by Capgo for the implementation detail in Capacitor Plugins by Capgo, and 플러그인 추가 또는 업데이트 플러그인 추가 또는 업데이트 구현 세부 사항에 대한 설명입니다.