NotificationAction


Purpose

A NotificationAction object represents a custom action that an app can perform in response to a notification. When the notification is displayed, the device's operating system displays buttons associated with each of the actions. Tapping a button launches the Pega Mobile Client (foregrounded or in the background) to facilitate performing of the indicated action.

Module

This object belongs to the Notifications product module.

Constructor

You can obtain an instance of the NotificationAction object by using the following definition.

[Constructor(identifier: String, title: String)]  
interface NotificationAction {  

  enum ActivationMode {  
    FOREGROUND = 0,         // Activate the app and put it in the foreground.  
    BACKGROUND = 1          // Activate the app and put it in the background. If the app is already in the foreground, it remains so.  
  }  

  // Delivered to the app as actionId.  
  attribute readonly identifier: String  

  // Localizable title of the action button.  
  attribute readonly title: String  

  // If the value is set to ActivationMode.FOREGROUND, authenticationRequired is always assumed to be true. Default is ActivationMode.FOREGROUND.  
  attribute activationMode: ActivationMode  

  // If set to true, signals the user whether the action causes destructive behavior by displaying the corresponding button differently.  
  // Only supported on iOS.  
  attribute destructive: Boolean  

  // Indicates whether the user must unlock the device before the action is performed.  
  attribute authenticationRequired: Boolean  

  // The name (string) of the native icon that should be rendered on the action button on Android devices.  
  // All icons listed at http://developer.android.com/reference/android/R.drawable.html are available.  
  // Since an icon is required by Android, when not specified ic_menu_info_details will be used as a default.  
  attribute iconName: String  
}

Related topics

Notifications
Legal notice | Copyright © 2019 and Confidential to Pegasystems Inc. All rights reserved
Pega Community | Feedback
Advanced...