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.
설치
설치 제목bun add @capgo/capacitor-proximitybunx cap syncimport
import 제목import { CapacitorProximity } from '@capgo/capacitor-proximity';API 개요
API 개요 제목enable
Section titled “enable”근접 센서 모니터링을 활성화합니다.
iOS에서 이 기능을 활성화하면 UIDevice.isProximityMonitoringEnabledAndroid에서 이 기능은 센서를 감지하기 시작하고 TYPE_PROXIMITY 현재 앱 창을 어둡게 합니다.
import { CapacitorProximity } from '@capgo/capacitor-proximity';
await CapacitorProximity.enable();disable
Section titled “disable”근접 센서 모니터링을 비활성화합니다.
기본 앱 창 동작을 복원하고 센서 모니터링을 중지합니다.
import { CapacitorProximity } from '@capgo/capacitor-proximity';
await CapacitorProximity.disable();getStatus
Section titled “getStatus”현재 센서 사용 가능 상태와 플러그인 활성화 상태를 가져옵니다.
import { CapacitorProximity } from '@capgo/capacitor-proximity';
const status = await CapacitorProximity.getStatus();Type Reference
Type Reference 섹션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
PluginVersionResult 섹션플러그인 버전을 요청할 때 반환되는 결과
export interface PluginVersionResult { /** * Native plugin version string. * * @since 0.0.1 */ version: string;}Source Of Truth
Source Of Truth 섹션이 페이지는 플러그인의 소스에서 생성됩니다. src/definitions.ts. upstream의 API이 변경되면 다시 싱크를 실행하세요.
Getting Started에서 계속
Getting Started에서 계속하는 섹션Capgo를 사용 중이라면 Getting Started 대시보드와 Capgo의 API를 계획하고 운영하기 위해 Capgo의 @capgo/capacitor-proximity를 사용하세요. Capgo의 @capgo/capacitor-proximity를 사용하는 native capability에 대한 설명 Capgo의 API Overview Capgo의 API Overview에 대한 implementation detail 소개 소개에 대한 implementation detail API 키 implementation 세부 정보에 대한 API 키 장치 implementation 세부 정보에 대한 장치.