Show notification with summary
Here's an example of showing a notification with summary. Summary will display in desktop notification also.
Here's a Typescript example:
const frameworkProvider: IUiEventsFrameworkProvider = await CX_SVC_UI_EVENTS_FRAMEWORK.uiEventsFramework.initialize('MyFirstExtensionID', 'v1');
let notificationContext: INotificationContext = await frameworkProvider.getNotificationContext('notificationId007');
const requestObject: IShowNotificationRequest = (frameworkProvider.requestHelper.createPublishRequest('ShowNotification') as IShowNotificationRequest;
requestObject.setTitle('Title');
requestObject.setSummary('Summary of the notification - displays in desktop notification too');
notificationContext.publish(requestObject).then((message) => {
const resp = message as INotificationOperationResponse;
});
Here's a JavaScript example:
const frameworkProvider = await CX_SVC_UI_EVENTS_FRAMEWORK.uiEventsFramework.initialize('MyFirstExtensionID', 'v1');
let notificationContext = await frameworkProvider.getNotificationContext('notificationId007');
const requestObject = frameworkProvider.requestHelper.createPublishRequest('ShowNotification');
requestObject.setTitle('Title');
requestObject.setSummary('Summary of the notification - displays in desktop notification too');
notificationContext.publish(requestObject).then((resp) => {
//custom Code
}).catch((err) => {
console.log(err);
});