feat: 안드로이드 하이브리드 앱(Capacitor) 구성
CI / build (push) Failing after 13m47s

- capacitor.config + android/ 네이티브 프로젝트
- 앱 전용 빌드(.env.capacitor, build:app), 뒤로가기·safe-area
- docs/ANDROID.md

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
ByungCheol
2026-05-31 19:13:12 +09:00
parent 245c026e50
commit 840ec84e0d
62 changed files with 2019 additions and 14 deletions
+19
View File
@@ -0,0 +1,19 @@
// Capacitor 네이티브(안드로이드) 통합. 웹에서는 no-op.
import { Capacitor } from '@capacitor/core'
import { App as CapApp } from '@capacitor/app'
export function setupCapacitor(router) {
if (!Capacitor.isNativePlatform()) return
// 안드로이드 하드웨어 뒤로가기 → 라우터 뒤로, 더 못 가면 앱 종료
CapApp.addListener('backButton', ({ canGoBack }) => {
if (canGoBack && window.history.length > 1) {
router.back()
} else {
CapApp.exitApp()
}
})
// 네이티브 표시용 클래스 (safe-area 등 스타일 분기)
document.documentElement.classList.add('is-native')
}