Skip to content

Getting Started

GitHub

You can use our AI-Assisted Setup to install the plugin. Add the Capgo skills to your AI tool using the following command:

Terminal window
bunx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-plugins

Then use the following prompt:

Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-rich-notifications` plugin in my project.

If you prefer Manual Setup, install the plugin by running the following commands and follow the platform-specific instructions below:

Terminal window
bun add @capgo/capacitor-rich-notifications
bunx cap sync
import { RichNotifications } from '@capgo/capacitor-rich-notifications';
import { RichNotifications } from '@capgo/capacitor-rich-notifications';
const { status } = await RichNotifications.requestPermission();
if (status !== 'granted') return;
import { RichNotifications } from '@capgo/capacitor-rich-notifications';
await RichNotifications.createChannel({
id: 'alerts',
name: 'Alerts',
importance: 'high',
});
import { RichNotifications } from '@capgo/capacitor-rich-notifications';
const { id } = await RichNotifications.display({
title: 'Hello',
body: 'Tap to open',
channelId: 'alerts',
});
  • Listeners: remove handles when screens unmount.
  • Native sync: run bunx cap sync after plugin upgrades.
  • Source of truth: trust src/definitions.ts in the GitHub repo.
  • iOS setup for categories and interruption levels.
  • Android setup for POST_NOTIFICATIONS, channels, and optional exact alarm or foreground service permissions.
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);
});