fm-notification-service
Capacitor plugin that shows a Firebase push notification with audio and vibration alerts when a message is received
Install
npm install fm-notification-service
npx cap sync
API
startNotificationService(...)
stopNotificationService(...)
addListener('notificationUpdate', ...)
removeAllListeners()
- Interfaces
startNotificationService(...)
startNotificationService(options: { value: string; }) => Promise<{ value: string; }>
Param | Type |
---|---|
options | { value: string; } |
Returns: Promise<{ value: string; }>
stopNotificationService(...)
stopNotificationService(options: { value: string; }) => Promise<{ value: string; }>
Param | Type |
---|---|
options | { value: string; } |
Returns: Promise<{ value: string; }>
addListener('notificationUpdate', ...)
addListener(eventName: 'notificationUpdate', listenerFunc: (data: NotificationData) => void) => Promise<PluginListenerHandle>
Param | Type |
---|---|
eventName | 'notificationUpdate' |
listenerFunc | (data: NotificationData) => void |
Returns: Promise<PluginListenerHandle>
removeAllListeners()
removeAllListeners() => Promise<void>
Interfaces
PluginListenerHandle
Prop | Type |
---|---|
remove | () => Promise<void> |
NotificationData
Prop | Type |
---|---|
message | number |
body | number |