내용으로 건너뛰기

Getting Started

GitHub

설치

설치

설치하기를 위해 AI-Assisted Setup을 사용할 수 있습니다. AI 도구에 Capgo 스킬을 추가하려면 다음 명령어를 사용하세요:

터미널 창
npx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-plugins

그런 다음 다음 명령어를 사용하세요:

Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-proximity` plugin in my project.

만약 Manual Setup을 선호한다면, 다음 명령어를 실행하고 아래의 플랫폼별 지침을 따르세요:

터미널 창
bun add @capgo/capacitor-proximity
bunx cap sync
import { CapacitorProximity } from '@capgo/capacitor-proximity';

근접 감지 모니터링을 활성화합니다.

iOS에서 이 기능은 UIDevice.isProximityMonitoringEnabled. Android에서 이 기능은 센서를 감지하기 시작합니다. TYPE_PROXIMITY 클립보드에 복사

import { CapacitorProximity } from '@capgo/capacitor-proximity';
await CapacitorProximity.enable();

이것은 기본 앱 창 동작을 복원하고 센서 모니터링을 중지합니다.

클립보드에 복사

import { CapacitorProximity } from '@capgo/capacitor-proximity';
await CapacitorProximity.disable();

클립보드에 복사

import { CapacitorProximity } from '@capgo/capacitor-proximity';
const status = await CapacitorProximity.getStatus();

ProximityStatusResult

ProximityStatusResult 섹션

ProximityStatusResult를 반환하는 결과 getStatus().

export interface ProximityStatusResult {
/**
* Whether the current device exposes a usable proximity sensor.
*
* @since 0.0.1
*/
available: boolean;
/**
* Whether proximity monitoring is currently enabled by the plugin.
*
* @since 0.0.1
*/
enabled: boolean;
/**
* Platform label returned by the native or web implementation.
*
* @since 0.0.1
*/
platform: 'ios' | 'android' | 'web';
}

클립보드에 복사

export interface PluginVersionResult {
/**
* Native plugin version string.
*
* @since 0.0.1
*/
version: string;
}

실질적 진실 섹션

이 페이지는 플러그인의

공개 __CAPGO_KEEP_0__이 업스트림에서 변경될 때 다시 싱크를 실행하세요. src/definitions.ts. Re-run the sync when the public API changes upstream.

다음 단계로 진행하기

다음 단계로 진행하기

Capgo를 사용 중이라면 Getting Started Capgo를 사용하여 대시보드와 API 연산을 계획하고 싶다면 API와 연결하세요 Capgo를 사용하여 @capgo/capacitor-proximity Capgo를 사용하여 @capgo/capacitor-proximity의 네이티브 기능 API 개요 API의 구현 세부 정보 소개 소개의 구현 세부 정보 API 키 구현 세부 정보에 대한 API 키 기기 구현 세부 정보에 대한 기기