메인 콘텐츠로 건너뛰기
@capgo/capacitor-리치 알림 커뮤니케이션 오픈 소스

리치 알림 Capacitor 플러그인

안드로이드 채널, 진행률 레이아웃, 액션 버튼, 스케줄링 및 iOS 중단 수준을 지원하는 로컬 알림

설치

bun add @capgo/capacitor-rich-notifications bunx cap sync
npm, pnpm 또는 yarn
  • npm install @capgo/capacitor-rich-notifications
  • pnpm add @capgo/capacitor-rich-notifications
  • yarn add @capgo/capacitor-rich-notifications

Guide

Capacitor에서 Rich Notifications를 사용하는 방법

capgo/capacitor-rich-notifications를 사용하는 방법

Android 채널, 진행 레이아웃, 액션 버튼, 스케줄링 및 iOS 중단 수준을 지원하는 로컬 알림

설치

bun add @capgo/capacitor-rich-notifications
bunx cap sync

이 플러그인이 노출하는 항목

  • checkPermission - 로컬 알림 권한 상태를 확인합니다.
  • requestPermission - 로컬 알림 권한을 요청하세요.
  • createChannel - 안드로이드 알림 채널을 생성하세요.
  • createChannelGroup - 안드로이드 채널 그룹을 생성하세요.
  • deleteChannel - 안드로이드 알림 채널을 삭제하세요.
  • display - 즉시 로컬 알림을 표시하세요.
  • schedule - 나중에 로컬 알림을 예약하세요.
  • cancel - 특정 알림 ID로 알림을 취소하세요.
  • cancelAll - 이 플러그인이 관리하는 모든 알림을 취소하세요.
  • getDisplayed - 앱의 그림자 또는 센터에서 표시된 알림 목록을 표시하세요.
  • getPending - 아직 표시되지 않은 예약된 알림 목록을 표시하세요.
  • getInitialNotification - 앱을 열었던 알림을 반환하세요.
  • setBadge - iOS에서 앱 아이콘 배지 수를 설정하세요.
  • registerActions - 재사용 가능한 액션 카테고리를 등록하세요.
  • getPluginVersion - 플랫폼 구현 버전 마커를 반환합니다.
  • addListener - 누르기와 취소 이벤트를 듣습니다.

예시 사용

requestPermission 그리고 display

import { RichNotifications } from '@capgo/capacitor-rich-notifications';

await RichNotifications.requestPermission();

await RichNotifications.createChannel({
  id: 'messages',
  name: 'Messages',
  importance: 'high',
});

await RichNotifications.display({
  title: 'Hello',
  body: 'Tap to open the app',
  channelId: 'messages',
});

schedule

import { RichNotifications } from '@capgo/capacitor-rich-notifications';

await RichNotifications.schedule({
  notification: {
    id: 'reminder-1',
    title: 'Reminder',
    body: 'Your appointment starts soon',
    channelId: 'messages',
  },
  trigger: { type: 'timestamp', timestamp: Date.now() + 60_000 },
});

전체 참조

FAQ

Rich Notifications 플러그인 FAQ

Rich Notifications 플러그인을 Capacitor 앱에 설치하는 방법은 어떻게 합니까?

Run "bun add @capgo/capacitor-rich-notifications" (또는 "npm install @capgo/capacitor-rich-notifications"), 그리고 iOS 및 Android 프로젝트가 네이티브 code를 인식할 수 있도록 "bunx cap sync"를 실행하세요. 그리고 앱 code에서 "@capgo/capacitor-rich-notifications"를 import하세요.

React, Vue 및 Angular과 함께 @capgo/capacitor-rich-notifications가 작동합니까?

네. Rich Notifications는 Capacitor 패키지이므로, Ionic, React, Vue, Angular, Svelte 및 plain JavaScript와 같은 웹 프레임워크가 Capacitor 내부에서 실행되는 경우에 작동합니다.

어떤 Capacitor 버전이 @capgo/capacitor-rich-notifications를 지원합니까?

Capgo plugins follow Capacitor's major version: use the plugin major version that matches your Capacitor major version (for example plugin v8 with Capacitor 8). The compatibility table in the GitHub README lists the maintained versions.

Capgo의 @capgo/capacitor-rich-notifications은 무료이며 오픈 소스인가요?

Yes. The source code is public on GitHub at https://github.com/Cap-go/capacitor-rich-notifications/ and the package is free to install from npm. Bug reports and pull requests are welcome.

code이 Rich Notifications을 사용하는 경우 App Store 리뷰 없이 업데이트가 가능한가요?

Installing or upgrading the plugin changes native code, so it needs a new store build. After that, JavaScript, HTML and CSS changes that call the plugin can ship instantly with Capgo live updates.

Rich Notifications 변경 사항을 앱 리뷰 기다리지 않고 배포

플러그인이 스토어 빌드에 포함된 후, Capgo 라이브 업데이트 사용하여 사용자에게 JavaScript, HTML 및 CSS 변경 사항을 몇 분만에 푸시합니다.

Capgo로 시작하세요