Getting Started
Copia un prompt de configuración con los pasos de instalación y la guía de markdown completa para este plugin.
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-rich-notifications`
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/rich-notifications/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.
Instalar
Sección titulada “Instalar”Puedes utilizar nuestra configuración asistida por IA para instalar el complemento. Agrega las Capgo habilidades a tu herramienta de IA utilizando el siguiente comando:
npx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-pluginsLuego utiliza el siguiente prompt:
Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-rich-notifications` plugin in my project.Si prefieres la configuración manual, instala el plugin ejecutando los siguientes comandos y sigue las instrucciones específicas de la plataforma a continuación.
npm install @capgo/capacitor-rich-notificationsnpx cap syncImportar
Sección titulada “Importar”import { RichNotifications } from '@capgo/capacitor-rich-notifications';Configuración de plataforma
Sección titulada “Configuración de plataforma”- iOS setup para categorías y niveles de interrupción.
- Configuración de Android para
POST_NOTIFICATIONScanales, y permisos de alarma o servicio de fondo opcionales.
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',});
await RichNotifications.addListener('press', (event) => { console.log(event.id, event.actionId, event.input);});