Skip to content

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. 안드로이드에서 이 기능은 센서가 가려질 때까지 현재 앱 창을 어둡게 합니다. TYPE_PROXIMITY and dims the current 앱 창을 어둡게 합니다.

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

가까운 거리 감지 모니터링을 끕니다.

Copy to clipboard

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

Copy to clipboard

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

Section titled “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

PluginVersionResult

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

원본

원본

이 페이지는 플러그인의 src/definitions.ts API이 업스트림에서 변경될 때 다시 싱크를 실행하세요.

Getting Started에서 계속

Getting Started에서 계속

__CAPGO_KEEP_0__을 사용 중이라면 Getting Started API 대시보드와 API 연산을 계획하고 싶다면 Using @capgo/capacitor-proximity for the native capability in Using @capgo/capacitor-proximity, Using @API/__CAPGO_KEEP_1__-proximity API 개요 __CAPGO_KEEP_0__의 구현 세부 사항에 대해 Introduction API의 구현 세부 사항에 대해 API 키 __CAPGO_KEEP_0__ 키의 구현 세부 사항에 대해 및 장치 __CAPGO_KEEP_0__ 구현 세부 사항.