시작하기
이 플러그인의 설치 단계와 전체 마크다운 가이드를 포함한 설정 명령어를 복사하세요.
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
Import 섹션import { CapacitorAndroidKiosk } from '@capgo/capacitor-android-kiosk';API 개요
API 개요 섹션isInKioskMode
isInKioskMode 섹션앱이 현재 키오스크 모드에서 실행되는지 확인합니다.
import { CapacitorAndroidKiosk } from '@capgo/capacitor-android-kiosk';
const { isInKioskMode } = await CapacitorAndroidKiosk.isInKioskMode();console.log('Kiosk mode active:', isInKioskMode);isSetAsLauncher
isSetAsLauncher 섹션설치된 앱이 장치의 홈 앱으로 설정되어 있는지 확인합니다.
import { CapacitorAndroidKiosk } from '@capgo/capacitor-android-kiosk';
const { isLauncher } = await CapacitorAndroidKiosk.isSetAsLauncher();console.log('Is launcher:', isLauncher);enterKioskMode
‘enterKioskMode’ 섹션시스템 UI를 숨기고 하드웨어 버튼을 차단하는 키오스크 모드를 시작합니다. 앱이 시스템으로부터 죽이지 않도록 foreground keep-alive 서비스를 시작합니다. 이 기능이 효과적으로 작동하려면 앱이 장치의 홈 앱으로 설정되어 있어야 합니다.
import { CapacitorAndroidKiosk } from '@capgo/capacitor-android-kiosk';
await CapacitorAndroidKiosk.enterKioskMode();exitKioskMode
‘exitKioskMode’ 섹션키오스크 모드를 종료하고 일반 시스템 UI와 하드웨어 버튼 기능을 복원합니다. enterKioskMode()에서 시작한 foreground keep-alive 서비스도 중지합니다.
import { CapacitorAndroidKiosk } from '@capgo/capacitor-android-kiosk';
await CapacitorAndroidKiosk.exitKioskMode();console.log('Exited kiosk mode');setAsLauncher
‘setAsLauncher’ 섹션사용자가 이 앱을 런처로 설정할 수 있도록 장치의 홈 화면 설정을 열어줍니다. 키오스크 모드의 전체 기능을 사용하려면 이 설정이 필요합니다.
import { CapacitorAndroidKiosk } from '@capgo/capacitor-android-kiosk';
await CapacitorAndroidKiosk.setAsLauncher();// User will be prompted to select this app as the home appsetAllowedKeys
‘setAllowedKeys’ 섹션키오스크 모드에서 사용할 수 있는 하드웨어 키를 설정합니다. 기본적으로 키오스크 모드에서 모든 하드웨어 키가 차단됩니다.
import { CapacitorAndroidKiosk } from '@capgo/capacitor-android-kiosk';
// Allow volume keys onlyawait CapacitorAndroidKiosk.setAllowedKeys({ volumeUp: true, volumeDown: true, back: false, home: false, recent: false});타입 참조
타입 참조 섹션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 섹션이 페이지는 플러그인의 src/definitions.ts. 다시 싱크를 실행할 때 공개 API upstream에서 변경되면.
Getting Started에서 계속
제목이 "Getting Started에서 계속"인 섹션이 플러그인을 사용하는 경우 Getting Started 계획 대시보드 및 API 작업을 계획하려면 이를 capgo/capacitor-android-kiosk @capgo/capacitor-android-kiosk native 기능을 사용하는 경우 Using @capgo/capacitor-android-kiosk Using @API/__CAPGO_KEEP_1__-android-kiosk, API Overview Using @API/__CAPGO_KEEP_1__-android-kiosk, API Overview Introduction implementation detail API Keys implementation detail in API Keys, and Devices Edit page