Tauri Plugin fcm-notifications
Installation
# Cargo.toml
[dependencies]
tauri-plugin-fcm-notifications = "0.1"
bun add tauri-plugin-fcm-notifications
# or
pnpm add tauri-plugin-fcm-notifications
# or
npm install tauri-plugin-fcm-notifications
# or
yarn add tauri-plugin-fcm-notifications
TypeScript
import { start, FCMEventPayload } from "tauri-plugin-fcm-notifications";
async function startNotifications() {
const token = await start(onFCMEvent);
// register the token in your API here
}
async function onFCMEvent(event: FCMEventPayload) {
// show notifications here
// E.g. using @tauri-apps/plugin-notification
}