시작하기
이 플러그인의 설치 단계와 전체 마크다운 가이드가 포함된 설정 지시를 복사하세요.
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-keep-awake`
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/keep-awake/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-keep-awakebunx cap sync수입
수입import { KeepAwake } from '@capgo/capacitor-keep-awake';API 개요
API 개요keepAwake
__CAPGO_KEEP_1__화면을 어둡게 하지 않도록 장치의 밝기를 유지합니다.
import { KeepAwake } from '@capgo/capacitor-keep-awake';
await KeepAwake.keepAwake();console.log('Screen will stay awake');allowSleep
__CAPGO_KEEP_0____CAPGO_KEEP_1__
import { KeepAwake } from '@capgo/capacitor-keep-awake';
await KeepAwake.allowSleep();console.log('Screen can now dim');isSupported
__CAPGO_KEEP_3____CAPGO_KEEP_4__
import { KeepAwake } from '@capgo/capacitor-keep-awake';
const { isSupported } = await KeepAwake.isSupported();if (isSupported) { console.log('Keep awake is supported');}isKeptAwake
__CAPGO_KEEP_6____CAPGO_KEEP_7__
import { KeepAwake } from '@capgo/capacitor-keep-awake';
const { isKeptAwake } = await KeepAwake.isKeptAwake();console.log('Is kept awake:', isKeptAwake);__CAPGO_KEEP_9__
__CAPGO_KEEP_10__IsSupportedResult
__CAPGO_KEEP_11__isSupported() 메소드의 결과입니다.
export interface IsSupportedResult { /** * Whether keep awake is supported on the current platform. * * @since 1.0.0 */ isSupported: boolean;}IsKeptAwakeResult
“IsKeptAwakeResult” 섹션isKeptAwake() 메소드의 결과입니다.
export interface IsKeptAwakeResult { /** * Whether the device is currently being kept awake. * * @since 1.0.0 */ isKeptAwake: boolean;}진실의 근원
플러그인의 이 페이지는__CAPGO_KEEP_0__이 업스트림에서 변경될 때 다시 싱크를 실행하세요. src/definitions.ts. Re-run the sync when the public API changes upstream.
“Keep going from Getting Started” 섹션
Capgo를 사용 중이라면isSupported() 메소드의 결과입니다. 시작하기 API를 위한 대시보드와 API 운영을 계획하고 연결하세요. @capgo/capacitor-keep-awake 사용 @capgo/capacitor-keep-awake의 네이티브 기능을 위한 사용 API 개요 API 개요의 구현 세부 정보를 위한 소개 소개의 구현 세부 정보를 위한 API 키 API 키의 구현 세부 정보를 위한 장치 장치의 구현 세부 정보를 위한