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-volume-buttons`
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/volume-buttons/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-volume-buttons` plugin in my project.만약 Manual Setup을 선호한다면, 다음 명령어를 실행하고 아래의 플랫폼별 지침을 따르세요:
bun add @capgo/capacitor-volume-buttonsbunx cap syncImport
Import라는 제목의 섹션import { VolumeButtons } from '@capgo/capacitor-volume-buttons';API 개요
API 개요라는 제목의 섹션addListener
addListener라는 제목의 섹션__CAPGO_KEEP_0__ 소프트웨어 볼륨 버튼의 클릭을 감지합니다.
import { VolumeButtons } from '@capgo/capacitor-volume-buttons';
const listener = await VolumeButtons.addListener( 'volumeButtonPressed', (event) => { console.log(`Volume ${event.direction} button pressed`); });
// Remove listener when doneawait listener.remove();removeAllListeners
제거하기이 플러그인의 모든 리스너를 제거합니다.
import { VolumeButtons } from '@capgo/capacitor-volume-buttons';
await VolumeButtons.removeAllListeners();getPluginVersion
버전 정보Capacitor 플러그인의 네이티브 버전을 가져옵니다.
import { VolumeButtons } from '@capgo/capacitor-volume-buttons';
const { version } = await VolumeButtons.getPluginVersion();console.log('Plugin version:', version);타입 참조
타입 참조VolumeButtonListener
볼륨 버튼 이벤트의 리스너 함수입니다.볼륨 버튼 이벤트의 리스너 함수입니다.
export type VolumeButtonListener = (event: VolumeButtonPressed) => void;VolumeButtonPressed
VolumeButtonPressed라는 섹션볼륨 버튼 누름에 대한 이벤트 데이터.
export interface VolumeButtonPressed { /** Direction of the button press */ direction: VolumeButtonDirection;}VolumeButtonDirection
VolumeButtonDirection라는 섹션볼륨 버튼 누름 방향.
export type VolumeButtonDirection = 'up' | 'down';진실의 근원
Source Of Truth라는 섹션이 페이지는 플러그인의 src/definitions.ts. upstream에서 변경된 API의 공개 버전을 다시 동기화할 때.
Getting Started에서 계속하기
시작부터 계속하기Capgo를 사용 중이라면 시작하기 API 대시보드와 연산을 계획하는 데 사용하는 경우 API를 capgo/@capgo/capacitor-볼륨-버튼을 사용하여 capgo/capacitor-볼륨-버튼을 사용하는 @capgo의 원시 기능에 대해 API 개요 API 개요의 구현 세부 정보에 대해 소개 소개의 구현 세부 정보에 대해 API 키 API 키의 구현 세부 정보에 대해 __CAPGO_KEEP_0__ __CAPGO_KEEP_1__