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-android-kiosk`
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/android-kiosk/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-android-kiosk` plugin in my project.클립보드에 복사
bun add @capgo/capacitor-android-kioskbunx cap syncImport
__CAPGO_KEEP_0__ importimport { CapacitorAndroidKiosk } from '@capgo/capacitor-android-kiosk';API 개요
API 개요isInKioskMode
__CAPGO_KEEP_1__앱이 현재 키오스크 모드에서 실행되고 있는지 확인합니다.
import { CapacitorAndroidKiosk } from '@capgo/capacitor-android-kiosk';
const { isInKioskMode } = await CapacitorAndroidKiosk.isInKioskMode();console.log('Kiosk mode active:', isInKioskMode);isSetAsLauncher
__CAPGO_KEEP_2__앱이 장치의 홈 앱으로 설정되어 있는지 확인합니다.
import { CapacitorAndroidKiosk } from '@capgo/capacitor-android-kiosk';
const { isLauncher } = await CapacitorAndroidKiosk.isSetAsLauncher();console.log('Is launcher:', isLauncher);enterKioskMode
Section titled “enterKioskMode”시스템 UI와 하드웨어 버튼을 숨기고 시스템에 의해 앱이 죽을 가능성을 줄이기 위해 전면 서비스를 시작하는 키오스크 모드에 들어갑니다. 키오스크 모드가 효과적으로 작동하려면 이 앱을 장치의 런처로 설정해야 합니다.
import { CapacitorAndroidKiosk } from '@capgo/capacitor-android-kiosk';
await CapacitorAndroidKiosk.enterKioskMode();exitKioskMode
Section titled “exitKioskMode”키오스크 모드를 종료하고 일반 시스템 UI와 하드웨어 버튼 기능을 복원합니다. 키오스크 모드에 들어간 후에 시작된 전면 서비스도 중지합니다.
import { CapacitorAndroidKiosk } from '@capgo/capacitor-android-kiosk';
await CapacitorAndroidKiosk.exitKioskMode();console.log('Exited kiosk mode');setAsLauncher
Section titled “setAsLauncher”이 앱을 런처로 설정하기 위해 사용자가 장치의 홈 스크린 설정을 열어줍니다. 키오스크 모드의 전체 기능을 사용하려면 이 앱을 런처로 설정해야 합니다.
import { CapacitorAndroidKiosk } from '@capgo/capacitor-android-kiosk';
await CapacitorAndroidKiosk.setAsLauncher();// User will be prompted to select this app as the home appsetAllowedKeys
Section titled “setAllowedKeys”키오스크 모드에서 작동할 수 있는 하드웨어 키를 설정합니다. 기본적으로 키오스크 모드에서 모든 하드웨어 키가 차단됩니다.
import { CapacitorAndroidKiosk } from '@capgo/capacitor-android-kiosk';
// Allow volume keys onlyawait CapacitorAndroidKiosk.setAllowedKeys({ volumeUp: true, volumeDown: true, back: false, home: false, recent: false});Type Reference
타입 참조EnterKioskModeOptions
EnterKioskModeOptions키오스크 모드에 대한 enterKioskMode.
export interface EnterKioskModeOptions { /** * After reboot, start the app so you can call `enterKioskMode()` again. Best-effort only (OEM * behavior, force-stop). Omit to keep the saved value. Cleared when you call `exitKioskMode()`. */ restoreAfterReboot?: boolean;
/** * Periodically tries to bring the app to the foreground. Skipped while the screen is off. Often * blocked from the background on some devices—being the default launcher, relaxing battery limits, * and allowing exact alarms (where required) improve odds. Omit to keep the saved value. */ relaunch?: boolean;
/** Minutes between relaunch attempts when `relaunch` is on. Range 5–60; default 15. */ relaunchIntervalMinutes?: number;}AllowedKeysOptions
AllowedKeysOptions키오스크 모드에서 허용된 하드웨어 키의
export interface AllowedKeysOptions { /** * Allow volume up button * @default false */ volumeUp?: boolean;
/** * Allow volume down button * @default false */ volumeDown?: boolean;
/** * Allow back button * @default false */ back?: boolean;
/** * Allow home button * @default false */ home?: boolean;
/** * Allow recent apps button * @default false */ recent?: boolean;
/** * Allow power button * @default false */ power?: boolean;
/** * Allow camera button (if present) * @default false */ camera?: boolean;
/** * Allow menu button (if present) * @default false */ menu?: boolean;}Source Of Truth
Source Of Truth이 페이지는 플러그인의 src/definitions.ts. API이 업스트림에서 변경될 때 다시 싱크를 실행하세요.
Getting Started에서 계속 진행하세요.
Getting Started에서 계속 진행하세요이 __CAPGO_KEEP_0__을 사용 중이라면 Getting Started API을 API 대시보드와 API 연산을 계획하는 데 사용하는 경우 API을 capgo/capacitor-android-kiosk를 사용하여 @capgo/capacitor-android-kiosk capgo/capacitor-android-kiosk의 네이티브 기능을 사용하는 경우 @capgo/capacitor-android-kiosk API 개요 API 개요 소개 소개 API 키 API 키의 구현 세부 사항에 대해 장치 __CAPGO_KEEP_0__ 키의 구현 세부 사항에 대해.