Class: PushNotificationEventProxy¶
Provides event data for push notification events, such as: OnReceiveNotificationResponse, OnReceiveForegroundNotification, OnReceiveFetchCompletion.
Hierarchy¶
-
PushNotificationEventProxy
Implements¶
Summary¶
Constructors¶
Properties¶
Class Properties¶
Currently none in this class.
Inherited Properties¶
Currently none inherited from the parent class(es).
Accessors¶
Class Accessors¶
Inherited Accessors¶
Methods¶
Class Methods¶
Currently none in this class.
Inherited Methods¶
Currently none inherited from the parent class(es).
Constructors¶
Constructor¶
+ new PushNotificationEventProxy(eventName: string, notification: any): PushNotificationEventProxy
Overrides EventDataProxy.constructor
Parameters:
| Name | Type |
|---|---|
| eventName | string |
| notification | any |
Returns: PushNotificationEventProxy
Accessors¶
body¶
Get Signature¶
▸ getter
Retrieves the notification body text.
Example¶
const body = context.getEventData().body; // e.g. 'Order #1234 has been placed'
Returns¶
string
Retrieves the notification body text.
Implementation of IPushNotificationEventData.body
completionHandler¶
Get Signature¶
▸ getter
Retrieves the completion handler callback, if available.
Example¶
const handler = context.getEventData().completionHandler;
if (handler) {
handler();
}
Returns¶
any
Retrieves the completion handler callback, if available.
Implementation of IPushNotificationEventData.completionHandler
payload¶
Get Signature¶
▸ getter
Retrieves the full notification payload.
Example¶
const payload = context.getEventData().payload; // full notification payload object
Returns¶
any
Retrieves the full notification payload.
Implementation of IPushNotificationEventData.payload
title¶
Get Signature¶
▸ getter
Retrieves the notification title.
Example¶
const title = context.getEventData().title; // e.g. 'New Order'
Returns¶
string
Retrieves the notification title.
Implementation of IPushNotificationEventData.title