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-barometer`
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/barometer/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 도움을 받아 플러그인을 설치하세요. 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-barometer` plugin in my project.만약 Manual Setup을 선호한다면, 플러그인을 설치하기 위해 다음 명령어를 실행하고 아래의 플랫폼별 설명서를 따르세요.
bun add @capgo/capacitor-barometerbunx cap syncImport
Import 섹션import { CapacitorBarometer } from '@capgo/capacitor-barometer';API 개요
API 개요 섹션getMeasurement
__CAPGO_KEEP_0____CAPGO_KEEP_1__
import { CapacitorBarometer } from '@capgo/capacitor-barometer';
await CapacitorBarometer.getMeasurement();isAvailable
__CAPGO_KEEP_3____CAPGO_KEEP_4__
import { CapacitorBarometer } from '@capgo/capacitor-barometer';
await CapacitorBarometer.isAvailable();startMeasurementUpdates
__CAPGO_KEEP_6____CAPGO_KEEP_7__
__CAPGO_KEEP_8__ measurement __CAPGO_KEEP_9__
import { CapacitorBarometer } from '@capgo/capacitor-barometer';
await CapacitorBarometer.startMeasurementUpdates();stopMeasurementUpdates
__CAPGO_KEEP_11____CAPGO_KEEP_0__를 중지합니다.
import { CapacitorBarometer } from '@capgo/capacitor-barometer';
await CapacitorBarometer.stopMeasurementUpdates();checkPermissions
__CAPGO_KEEP_0__ 섹션__CAPGO_KEEP_0__를 사용하여 바로미터 데이터에 대한 접근 권한 상태를 반환합니다.
import { CapacitorBarometer } from '@capgo/capacitor-barometer';
await CapacitorBarometer.checkPermissions();requestPermissions
__CAPGO_KEEP_0__ 섹션__CAPGO_KEEP_0__를 사용하여 바로미터 데이터에 대한 접근 권한을 요청합니다.
import { CapacitorBarometer } from '@capgo/capacitor-barometer';
await CapacitorBarometer.requestPermissions();__CAPGO_KEEP_0__
__CAPGO_KEEP_0__ 섹션GetMeasurementResult
__CAPGO_KEEP_0__ 섹션__CAPGO_KEEP_0__
export type GetMeasurementResult = Measurement;IsAvailableResult
__CAPGO_KEEP_1____CAPGO_KEEP_2__
export interface IsAvailableResult { /** * Indicates whether the device exposes a barometer sensor. * * @since 1.0.0 */ isAvailable: boolean;}PermissionStatus
__CAPGO_KEEP_3____CAPGO_KEEP_4__ and __CAPGO_KEEP_5__
export interface PermissionStatus { /** * The permission state for accessing barometer measurements on the current platform. * * @since 1.0.0 */ barometer: BarometerPermissionState;}MeasurementEvent
__CAPGO_KEEP_6____CAPGO_KEEP_7__
export type MeasurementEvent = Measurement;Measurement
__CAPGO_KEEP_9__ and 상대적 고도값.__CAPGO_KEEP_0__
export interface Measurement { /** * The static air pressure in hectopascals (hPa). * * @since 1.0.0 */ pressure: number;
/** * The change in altitude relative to the time updates started. * Only available on iOS; Android will always return `0`. * * @since 1.0.0 */ relativeAltitude: number;
/** * The timestamp of the measurement in milliseconds since the Unix epoch. * * @since 1.0.0 */ timestamp: number;}BarometerPermissionState
'BarometerPermissionState' 섹션 제목__CAPGO_KEEP_0__에서 지원하는 플랫폼에 따라 센서 접근을 조절할 수 있는 limited 복사하기
export type BarometerPermissionState = PermissionState | 'limited';PermissionState
__CAPGO_KEEP_0__에서 지원하는 플랫폼 권한 상태Platform permission states supported by Capacitor.
export type PermissionState = 'prompt' | 'prompt-with-rationale' | 'granted' | 'denied';'Source Of Truth' 섹션 제목
이 페이지는 플러그인의. upstream에서 __CAPGO_KEEP_0__이 공개 변경될 때 다시 싱크를 실행하세요. src/definitions.ts. Re-run the sync when the public API changes upstream.
시작부터 계속하기
시작부터 계속하기 섹션Capgo를 사용 중이라면 시작하기 API를 위한 대시보드와 API 연산을 계획하려면 capgo를 사용하여 @capgo/capacitor-barometer for the native capability in Using @capgo/capacitor-barometer, API 개요 API 개요의 구현 세부 정보에 대해 소개 소개의 구현 세부 정보에 대해 API 키 API 키의 구현 세부 사항에 대해, 기기 __CAPGO_KEEP_0__ 키의 구현 세부 사항에 대해.