capacitor-google-notifications
FCM capacitor plugin
npm install capacitor-google-notifications
npx cap sync
initialize(initOptions: InitializeOptions, options: FCMOptions) => any
Returns: any
checkPermissions() => any
Returns: any
requestPermissions() => any
Returns: any
register(options: { vapidKey: string; }) => any
Param |
Type |
options |
{ vapidKey: string; } |
Returns: any
Returns: any
getDeliveredNotifications()
getDeliveredNotifications() => any
Returns: any
removeDeliveredNotifications(...)
removeDeliveredNotifications(delivered: DeliveredNotifications) => any
Returns: any
removeAllDeliveredNotifications()
removeAllDeliveredNotifications() => any
Returns: any
createChannel(channel: Channel) => any
Returns: any
deleteChannel(args: { id: string; }) => any
Param |
Type |
args |
{ id: string; } |
Returns: any
Returns: any
addListener('registration', ...)
addListener(eventName: 'registration', listenerFunc: (token: Token) => void) => any
Param |
Type |
eventName |
'registration' |
listenerFunc |
(token: Token) => void |
Returns: any
addListener('registrationError', ...)
addListener(eventName: 'registrationError', listenerFunc: (error: RegistrationError) => void) => any
Param |
Type |
eventName |
'registrationError' |
listenerFunc |
(error: RegistrationError) => void |
Returns: any
addListener('pushNotificationReceived', ...)
addListener(eventName: 'pushNotificationReceived', listenerFunc: (notification: PushNotificationSchema) => void) => any
Returns: any
addListener('pushNotificationActionPerformed', ...)
addListener(eventName: 'pushNotificationActionPerformed', listenerFunc: (notification: ActionPerformed) => void) => any
Param |
Type |
eventName |
'pushNotificationActionPerformed' |
listenerFunc |
(notification: ActionPerformed) => void |
Returns: any
removeAllListeners() => any
Returns: any
Prop |
Type |
name |
string |
initialize |
boolean |
initializeSw |
boolean |
Prop |
Type |
instanceIdentifier |
string |
options |
{} |
Prop |
Type |
notifications |
{} |
Prop |
Type |
title |
string |
subtitle |
string |
body |
string |
id |
string |
tag |
string |
badge |
string |
notification |
any |
data |
any |
clickAction |
string |
link |
string |
group |
string |
groupSummary |
boolean |
Prop |
Type |
id |
string |
name |
string |
description |
string |
sound |
string |
importance |
Importance |
visibility |
Visibility |
lights |
boolean |
lightColor |
string |
vibration |
boolean |
Prop |
Type |
remove |
() => any |
InstanceFactoryOptions
'prompt' | 'prompt-with-rationale' | 'granted' | 'denied'
1 | 2 | 3 | 4 | 5
-1 | 0 | 1