Getting Started
이 플러그인의 설치 단계와 전체 마크다운 가이드를 포함한 설치 프롬프트를 복사합니다.
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-proximity`
Run the required Capacitor sync/update step after installation.
Read this markdown guide for the full setup steps: https://raw.githubusercontent.com/Cap-go/website/refs/heads/main/apps/docs/src/content/docs/docs/plugins/proximity/getting-started.mdx
Use that guide for platform-specific steps, native file edits, permissions, config changes, imports, and usage setup.
If that guide references other docs pages, read them too.
설치
설치 제목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-proximitybunx cap syncImport
Import 섹션import { CapacitorProximity } from '@capgo/capacitor-proximity';API 개요
API 개요 섹션enable
enable 섹션근접 감지 모니터링을 활성화합니다.
iOS에서 이 기능은 UIDevice.isProximityMonitoringEnabledAndroid에서 이 기능은 센서를 감지하기 시작합니다. TYPE_PROXIMITY 센서가 가려지면 현재 앱 창을 어둡게 합니다.
import { CapacitorProximity } from '@capgo/capacitor-proximity';
await CapacitorProximity.enable();disable
제목이 'disable'인 섹션근접 감지 모니터링을 비활성화합니다.
이것은 기본 앱 창 동작을 복원하고 센서 모니터링을 중지합니다.
import { CapacitorProximity } from '@capgo/capacitor-proximity';
await CapacitorProximity.disable();getStatus
제목이 'getStatus'인 섹션현재 센서 사용 가능 상태와 플러그인 활성화 상태를 가져옵니다.
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';}PluginVersionResult
플러그인 버전을 요청할 때 반환되는 결과클립보드에 복사
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.
다음 단계로
“다음 단계로”라는 제목Cloudflare, Capacitor, GitHub, Capgo, code, API, SDK, CLI, npm, bun Getting Started to plan dashboard and API operations, connect it with Using @capgo/capacitor-proximity for the native capability in Using @capgo/capacitor-proximity, API Overview for the implementation detail in API Overview, Capacitor Capacitor API Keys 구현 세부 정보에 대한 API 키에 대해 기기 구현 세부 정보에 대한 기기에 대해