무료로 시작하기
이 플러그인의 설치 단계와 전체 마크다운 가이드를 포함한 설정 지시를 복사하세요.
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.
설치
설치 제목플러그인을 설치하기 위해 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-flash` plugin in my project.만들기 설정을 선호한다면, 다음 명령어를 실행하여 플러그인을 설치하고 아래의 플랫폼별 지침을 따르세요.
bun add @capgo/capacitor-flashbunx cap syncImport
Import 섹션import { CapacitorFlash } from '@capgo/capacitor-flash';API 개요
API 개요 섹션isAvailable
isAvailable 섹션장치에서 플래시등이 사용 가능한지 확인합니다.
import { CapacitorFlash } from '@capgo/capacitor-flash';
const { value } = await CapacitorFlash.isAvailable();if (value) { console.log('Flashlight is available');}switchOn
switchOn 섹션켜짐
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
switchOff꺼짐
import { CapacitorFlash } from '@capgo/capacitor-flash';
await CapacitorFlash.switchOff();isSwitchedOn
isSwitchedOn켜짐/꺼짐 여부 확인
import { CapacitorFlash } from '@capgo/capacitor-flash';
const { value } = await CapacitorFlash.isSwitchedOn();console.log('Flashlight is on:', value);toggle
toggle켜짐/꺼짐 토글
import { CapacitorFlash } from '@capgo/capacitor-flash';
const { value } = await CapacitorFlash.toggle();console.log('Flashlight toggled, now on:', value);실질적인 출처
제목: '진실의 근원'이 페이지는 플러그인의 src/definitions.ts를 다시 동기화할 때 upstream의 API이 변경되면 다시 동기화하십시오.
Getting Started에서 계속
제목: 'Getting Started에서 계속'이 플러그인을 사용 중이라면 Getting Started 를 사용하여 대시보드와 API를 계획하고 있습니다. capgo/capacitor 플래시 사용 @capgo/capacitor-flash API 개요 native capability을 위해 Using @API/__CAPGO_KEEP_1__-flash를 사용합니다. 소개 소개에 대한 구현 세부 정보를 위해 API 키 API 키에 대한 구현 세부 정보를 위해, 그리고 장치 소개에 대한 구현 세부 정보를 위해