Langsung ke konten

@capgo/capacitor-firebase-messaging

Capacitor plugin for Firebase Cloud Messaging (FCM).

Capacitor plugin for Firebase Cloud Messaging (FCM).

  • 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.
MethodDescription
checkPermissionsCheck permission to receive push notifications.
requestPermissionsRequest permission to receive push notifications.
isSupportedChecks if all required APIs exist.
getTokenRegister the app to receive push notifications. Returns a FCM token that can be used to send push messages to that Messaging instance.
deleteTokenDelete the FCM token and unregister the app to stop receiving push notifications. Can be called, for example, when a user signs out.
getDeliveredNotificationsGet a list of notifications that are visible on the notifications screen.
removeDeliveredNotificationsRemove specific notifications from the notifications screen.
removeAllDeliveredNotificationsRemove all notifications from the notifications screen.
subscribeToTopicSubscribes to topic in the background.
unsubscribeFromTopicUnsubscribes from topic in the background.
createChannelCreate a notification channel.
deleteChannelDelete a notification channel.
listChannelsList the available notification channels.
addListenerCalled when a new FCM token is received.
addListenerCalled when a new push notification is received.
addListenerCalled when a new push notification action is performed.
removeAllListenersRemove all listeners for this plugin.
getPluginVersionGet the version of this plugin.

This reference is synced from src/definitions.ts in capacitor-firebase.