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

리치 알림 Capacitor 플러그인

Android 채널, 진행 레이아웃, 액션 버튼, 스케줄링 및 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

사용자 가이드

Capacitor에서 리치 알림을 사용하는 방법

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

리치 알림 플러그인 FAQ

리치 알림 플러그인을 Capacitor 앱에 설치하는 방법은 어떻게 되나요?

Run "bun add @capgo/capacitor-rich-notifications" (또는 "npm install @capgo/capacitor-rich-notifications")를 실행한 후 "bunx cap sync"를 실행하여 iOS 및 Android 프로젝트가 네이티브 code를 인식하도록 합니다. 그리고 code에서 "@capgo/capacitor-rich-notifications"를 임포트합니다.

리액트, 뷰, 앵귤러와 함께 @capgo/capacitor-rich-notifications가 작동합니까?

네. 리치 알림은 Capacitor 패키지이므로, Capacitor 내에서 실행되는 모든 웹 프레임워크와 함께 작동합니다. 예를 들어 Ionic, React, Vue, Angular, Svelte 및 일반 JavaScript도 포함됩니다.

Which Capacitor version does @capgo/capacitor-rich-notifications support?

Capgo 플러그인은 Capacitor의 메이저 버전을 따릅니다: Capacitor의 메이저 버전과 일치하는 플러그인 메이저 버전을 사용하십시오 (예를 들어 플러그인 v8과 Capacitor 8). GitHub README에 있는 호환성 표에서 유지 보수되는 버전을 확인하십시오.

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

네. code의 소스는 GitHub에 https://github.com/Cap-go/capacitor-rich-notifications/에서 공개되어 있으며 npm에서 무료로 설치할 수 있습니다. 버그 리포트와 풀 리퀘스트는 환영합니다.

code를 사용하는 Rich Notifications를 업데이트할 수 있나요?

code를 설치하거나 업그레이드하면 네이티브 code가 변경되므로 새로운 스토어 빌드를 필요로 합니다. 그 후에 Capgo live updates를 사용하여 JavaScript, HTML 및 CSS 변경 사항을 즉시 배포할 수 있습니다.

앱 리뷰 기다리지 않고 Rich Notifications 변경을 배포하세요

플러그인이 스토어 빌드에 포함된 후 Capgo live updates는 사용자에게 몇 분 내에 JavaScript, HTML 및 CSS 변경을 푸시합니다.

Capgo으로 시작하세요