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-pedometer`
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/pedometer/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-pedometerbunx cap syncimport
설치란?import { CapacitorPedometer } from '@capgo/capacitor-pedometer';API 개요
설정란: API 개요getMeasurement
설정란: getMeasurement__CAPGO_KEEP_0__ 시간 범위 내의歩数計 측정치를 가져옵니다.
import { CapacitorPedometer } from '@capgo/capacitor-pedometer';
await CapacitorPedometer.getMeasurement();isAvailable
설정란: isAvailable이 장치에서 사용 가능한 페이드미터 기능을 확인하세요.
import { CapacitorPedometer } from '@capgo/capacitor-pedometer';
await CapacitorPedometer.isAvailable();startMeasurementUpdates
startMeasurementUpdates실시간 페이드미터 측정 업데이트 수신을 시작하세요.
켜짐 안드로이드 및 iOS, measurement 이벤트는 startMeasurementUpdates().
import { CapacitorPedometer } from '@capgo/capacitor-pedometer';
await CapacitorPedometer.startMeasurementUpdates();stopMeasurementUpdates
stopMeasurementUpdates실시간 걸음 수 측정 업데이트 수신을 중지합니다.
import { CapacitorPedometer } from '@capgo/capacitor-pedometer';
await CapacitorPedometer.stopMeasurementUpdates();checkPermissions
권한 확인(checkPermissions) 섹션 제목자전거 데이터에 대한 접근 권한 확인
켜짐 안드로이드, 권한을 확인합니다.
ACTIVITY_RECOGNITION 켜짐 iOS, 운동 사용 권한을 확인합니다.
import { CapacitorPedometer } from '@capgo/capacitor-pedometer';
await CapacitorPedometer.checkPermissions();requestPermissions
권한 요청(requestPermissions) 섹션 제목__CAPGO_KEEP_0__
__CAPGO_KEEP_1__ __CAPGO_KEEP_2____CAPGO_KEEP_3__ ACTIVITY_RECOGNITION __CAPGO_KEEP_4__ __CAPGO_KEEP_5____CAPGO_KEEP_6__
import { CapacitorPedometer } from '@capgo/capacitor-pedometer';
await CapacitorPedometer.requestPermissions();__CAPGO_KEEP_8__
__CAPGO_KEEP_9__GetMeasurementOptions
__CAPGO_KEEP_10__export interface GetMeasurementOptions { /** * The start time for the measurement query (milliseconds since epoch). * * Required on **iOS**. * * @since 0.0.1 */ start?: number;
/** * The end time for the measurement query (milliseconds since epoch). * * Required on **iOS**. * * @since 0.0.1 */ end?: number;}Measurement
측정 섹션export interface Measurement { /** * The number of steps taken by the user. * * @since 0.0.1 */ numberOfSteps?: number;
/** * The estimated distance (in meters) traveled by the user. * * Only available on **iOS**. * * @since 0.0.1 */ distance?: number;
/** * The approximate number of floors ascended. * * Only available on **iOS**. * * @since 0.0.1 */ floorsAscended?: number;
/** * The approximate number of floors descended. * * Only available on **iOS**. * * @since 0.0.1 */ floorsDescended?: number;
/** * The current pace (in seconds per meter). * * Only available on **iOS**. * * @since 0.0.1 */ currentPace?: number;
/** * The current cadence (steps per second). * * Only available on **iOS**. * * @since 0.0.1 */ currentCadence?: number;
/** * The average active pace (in seconds per meter). * * Only available on **iOS**. * * @since 0.0.1 */ averageActivePace?: number;
/** * The start time of this measurement (milliseconds since epoch). * * @since 0.0.1 */ startDate?: number;
/** * The end time of this measurement (milliseconds since epoch). * * @since 0.0.1 */ endDate?: number;}IsAvailableResult
IsAvailableResult 섹션export interface IsAvailableResult { /** * Whether step counting is available. * * @since 0.0.1 */ stepCounting: boolean;
/** * Whether distance measurement is available. * * Only `true` on **iOS** devices that support distance tracking. * * @since 0.0.1 */ distance: boolean;
/** * Whether pace measurement is available. * * Only `true` on **iOS** devices that support pace tracking. * * @since 0.0.1 */ pace: boolean;
/** * Whether cadence measurement is available. * * Only `true` on **iOS** devices that support cadence tracking. * * @since 0.0.1 */ cadence: boolean;
/** * Whether floor counting is available. * * Only `true` on **iOS** devices that support floor tracking. * * @since 0.0.1 */ floorCounting: boolean;}PermissionStatus
권한 상태 섹션export interface PermissionStatus { /** * Permission state for activity recognition. * * On **Android**, this is the `ACTIVITY_RECOGNITION` permission. * On **iOS**, this is the motion usage permission. * * @since 0.0.1 */ activityRecognition: 'prompt' | 'prompt-with-rationale' | 'granted' | 'denied';}MeasurementEvent
측정 이벤트 섹션export type MeasurementEvent = Measurement;실질적 원천
실질적 원천 섹션이 페이지는 플러그인의 src/definitions.ts. API이 업스트림에서 변경될 때마다 pubic을 다시 동기화하세요.
시작부터 계속하기
시작부터 계속하기 섹션__CAPGO_KEEP_0__을 사용하는 경우 시작하기 API을 계획하고 API 연산을 위해 연결하세요. capgo/capacitor-pedometer 사용 capgo/capacitor-pedometer의 네이티브 기능을 위한 @capgo/capacitor-pedometer API 개요 API 개요의 구현 세부 정보 소개 소개의 구현 세부 정보 API 키 API 키의 구현 세부 사항에 대해, 기기 __CAPGO_KEEP_0__ 키의 구현 세부 사항에 대해.