Getting Started
이 플러그인의 설치 단계와 전체 마크다운 가이드를 포함하여 __CAPGO_KEEP_0__를 복사할 수 있습니다.
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-flash`
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/flash/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.
설치: __CAPGO_KEEP_0__를 설치합니다.
__CAPGO_KEEP_0__를 붙여넣기할 준비가 되었습니다. 설치, 동기화 및 소스 마크다운 가이드가 포함되어 있습니다.AI-Assisted 설치를 사용하여 플러그인을 설치할 수 있습니다. 다음 명령어를 사용하여 Capgo 기능을 AI 도구에 추가하세요:
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-flash` plugin in my project.만약 Manual Setup을 선호한다면, 플러그인을 설치하기 위해 다음 명령어를 실행하고 아래의 플랫폼별 지침을 따르세요:
bun add @capgo/capacitor-flashbunx cap syncImport
‘Import’라는 제목의 섹션import { CapacitorFlash } from '@capgo/capacitor-flash';API 개요
API 개요isAvailable
__CAPGO_KEEP_0__ 사용 가능 여부__CAPGO_KEEP_0__가 장치에 사용 가능한지 확인합니다.
import { CapacitorFlash } from '@capgo/capacitor-flash';
const { value } = await CapacitorFlash.isAvailable();if (value) { console.log('Flashlight is available');}switchOn
__CAPGO_KEEP_0__ 켜기__CAPGO_KEEP_0__를 켭니다.
import { CapacitorFlash } from '@capgo/capacitor-flash';
// Turn on at full brightnessawait CapacitorFlash.switchOn({ intensity: 1.0 });
// Turn on at half brightnessawait CapacitorFlash.switchOn({ intensity: 0.5 });switchOff
__CAPGO_KEEP_0__ 끄기__CAPGO_KEEP_0__를 끕니다.
import { CapacitorFlash } from '@capgo/capacitor-flash';
await CapacitorFlash.switchOff();isSwitchedOn
__CAPGO_KEEP_0__ 상태 확인__CAPGO_KEEP_0__가 현재 켜져 있는지 확인합니다.
import { CapacitorFlash } from '@capgo/capacitor-flash';
const { value } = await CapacitorFlash.isSwitchedOn();console.log('Flashlight is on:', value);toggle
toggle 제목flashlight를 켜거나 끄세요.
import { CapacitorFlash } from '@capgo/capacitor-flash';
const { value } = await CapacitorFlash.toggle();console.log('Flashlight toggled, now on:', value);진실의 근원
진실의 근원 제목이 페이지는 플러그인의 src/definitions.ts. upstream에서 pubic API이 변경될 때 다시 싱크를 실행하세요.
Getting Started에서 계속하세요
Getting Started에서 계속하세요 제목Capgo를 사용 중이라면 Getting Started 대시보드와 API 운영을 계획하고 연결하세요. Using @capgo/capacitor-flash Using @capgo/capacitor-flash API 개요 for the implementation detail in API Overview, Capacitor Overview __CAPGO_KEEP_0__ 키 API Keys for the implementation detail in API Keys, and Capacitor Overview Capacitor Overview