PushNotificationsPlugin

createChannel

createChannel(channel: PushNotificationChannel): Promise<void>
channel PushNotificationChannel
Returns: Promise<void>

deleteChannel

deleteChannel(channel: PushNotificationChannel): Promise<void>
channel PushNotificationChannel
Returns: Promise<void>

getDeliveredNotifications

getDeliveredNotifications(): Promise<PushNotificationDeliveredList>
Returns: Promise<PushNotificationDeliveredList>

listChannels

listChannels(): Promise<PushNotificationChannelList>
Returns: Promise<PushNotificationChannelList>

register

register(): Promise<PushNotificationRegistrationResponse>
Returns: Promise<PushNotificationRegistrationResponse>

removeAllDeliveredNotifications

removeAllDeliveredNotifications(): Promise<void>
Returns: Promise<void>

removeDeliveredNotifications

removeDeliveredNotifications(delivered: PushNotificationDeliveredList): Promise<void>
delivered PushNotificationDeliveredList
Returns: Promise<void>

addListener

addListener(eventName: "registration", listenerFunc: (token: PushNotificationToken) => void): PluginListenerHandle
eventName "registration"
listenerFunc (token: PushNotificationToken) => void
Returns: PluginListenerHandle

addListener

addListener(eventName: "registrationError", listenerFunc: (error: any) => void): PluginListenerHandle
eventName "registrationError"
listenerFunc (error: any) => void
Returns: PluginListenerHandle

addListener

addListener(eventName: "pushNotificationReceived", listenerFunc: (notification: PushNotification) => void): PluginListenerHandle
eventName "pushNotificationReceived"
listenerFunc (notification: PushNotification) => void
Returns: PluginListenerHandle

addListener

addListener(eventName: "pushNotificationActionPerformed", listenerFunc: (notification: PushNotificationActionPerformed) => void): PluginListenerHandle
eventName "pushNotificationActionPerformed"
listenerFunc (notification: PushNotificationActionPerformed) => void
Returns: PluginListenerHandle

Interfaces Used

PushNotificationChannel

interface PushNotificationChannel {
description : string;
id : string;
importance : any;
name : string;
sound : string;
visibility ?: any;
}

PushNotificationDeliveredList

interface PushNotificationDeliveredList {
notifications : PushNotification[];
}

PushNotificationChannelList

interface PushNotificationChannelList {
channels : PushNotificationChannel[];
}