본문 바로가기

Android 설정

GitHub

이 플러그인은 다음을 병합합니다: POST_NOTIFICATIONS 앱에 병합합니다(Android 13 이상 필수). 다음으로 런타임 권한을 요청하세요: requestPermission(). 최소 SDK: 24.

다음으로 알림 채널을 생성하세요: createChannel 게시하기 전에. 다음을 사용하세요: channelId 각 알림에.

대상: 정확한 알람(exact alarms), 전체 화면 인텐트(full-screen intents), 그리고 포그라운드 서비스(foreground service) 알림을 사용하려면 앱 매니페스트에 선택적 권한(opt-in permissions)과 포그라운드 서비스를 추가해야 합니다. 프로젝트 루트에서:

터미널 창
bun ./node_modules/@capgo/capacitor-rich-notifications/scripts/apply-notification-permissions.mjs --project .

해당 헬퍼는 다음을 추가합니다: SCHEDULE_EXACT_ALARM, USE_FULL_SCREEN_INTENT, FOREGROUND_SERVICE, FOREGROUND_SERVICE_SPECIAL_USE, 그리고 다음을 선언합니다: app.capgo.richnotifications.RichForegroundService 포함 foregroundServiceType="specialUse".

사용 foregroundService: true 및 fullScreen: true 해당 권한이 있는 경우에만.