@capgo/capacitor-firebase-messaging
Capacitor plugin for Firebase Cloud Messaging (FCM).
Overview
Section titled “Overview”Capacitor plugin for Firebase Cloud Messaging (FCM).
Core Capabilities
Section titled “Core Capabilities”checkPermissions- Check permission to receive push notifications.requestPermissions- Request permission to receive push notifications.isSupported- Checks if all required APIs exist.getToken- Register the app to receive push notifications. Returns a FCM token that can be used to send push messages to that Messaging instance.
Public API
Section titled “Public API”| Method | Description |
|---|---|
checkPermissions | Check permission to receive push notifications. |
requestPermissions | Request permission to receive push notifications. |
isSupported | Checks if all required APIs exist. |
getToken | Register the app to receive push notifications. Returns a FCM token that can be used to send push messages to that Messaging instance. |
deleteToken | Delete the FCM token and unregister the app to stop receiving push notifications. Can be called, for example, when a user signs out. |
getDeliveredNotifications | Get a list of notifications that are visible on the notifications screen. |
removeDeliveredNotifications | Remove specific notifications from the notifications screen. |
removeAllDeliveredNotifications | Remove all notifications from the notifications screen. |
subscribeToTopic | Subscribes to topic in the background. |
unsubscribeFromTopic | Unsubscribes from topic in the background. |
createChannel | Create a notification channel. |
deleteChannel | Delete a notification channel. |
listChannels | List the available notification channels. |
addListener | Called when a new FCM token is received. |
addListener | Called when a new push notification is received. |
addListener | Called when a new push notification action is performed. |
removeAllListeners | Remove all listeners for this plugin. |
getPluginVersion | Get the version of this plugin. |
Source Of Truth
Section titled “Source Of Truth”This reference is synced from src/definitions.ts in capacitor-firebase.