Skip to content

Properties

The Local Notifications API contains the following properties:

backgroundColor


An optional String value (for example, ffffff for white) that fires a notification with the provided background color for the notification icon.

Syntax

backgroundColor

Type

String

Remarks

  • You can configure the background color of the notification icon at the app level in localnotificationconfig.xml and pushconfig.xml.

  • notify_local_msg_background_coloremptyNotification icon background color for local message notification.
    notify_push_msg_background_coloremptyNotification icon background color for push message notification.

Example


pspconfig:{
“backgroundColor” :  “ffffff”
}

Platform Availability

  • Android

priority


An optional constant integer value that fires a notification with the specified priority.

Syntax

priority

Type

int

Supported Values

  • constants.NOTIFICATION_PRIORITY_MIN: This is the lowest notification priority. For this priority value, the notifications may not be shown to the user, except for special circumstances such as detailed notification logs.
  • constants.NOTIFICATION_PRIORITY_MAX: This is the highest notification priority. This priority value should be used for your application's most important notifications that require the user's prompt attention or input.
  • constants.NOTIFICATION_PRIORITY_LOW: This is a lower notification priority. This priority value should be used for those notifications that are comparatively less important. The UI may choose to display these items in a smaller font or at a different position in the list, as compared to your app's PRIORITY_DEFAULT notifications.
  • constants.NOTIFICATION_PRIORITY_HIGH: This is a higher notification priority. This priority value should be used for more important notifications or alerts. The UI may choose to show these items in a larger font or at a different position in notification lists, as compared to your app's PRIORITY_DEFAULT notifications.
  • constants.NOTIFICATION_PRIORITY_DEFAULT: This is the default notification priority. If your application does not prioritize its own notifications, use this value for all notifications. This priority value is available from Android O and later. The priority is applied to the Notification Channel. The priority of an existing channel is changed only if the new priority is lower than the current value and the user has not altered any settings on this channel.
    You can configure the priority of notifications at the app level in localnotificationconfig.xml and pushconfig.xml.

  • notify_local_msg_priorityemptyPriority for local message notification.
    notify_push_msg_priorityemptyPriority for push message notification.

Example


pspconfig:{
“priority” :  constants.NOTIFICATION_PRIORITY_DEFAULT
}

Platform Availability

  • Android

repeats


An optional Boolean value that displays a notification repeatedly after a specific time interval. You must use the repeats function along with a timeInterval value.

Syntax

repeats

Type

Boolean

Remarks

  • You can only set repeats to true if timeInterval is equal to or greater than 60 seconds.

  • If repeats is set to true, the notification gets repeated multiple times.

  • If repeats is set to false, the notification is fired just once.

  • By default, the value of repeats is false.

Example

Repeat a notification after every 300 seconds.


pspconfig:{
“timeInterval”: 300
“repeats”: true
}

Platform Availability

  • iOS

timeInterval


An optional constant integer value that fires a notification at a time relative to the current time.

Syntax

timeInterval

Type

int

Remarks

  • You should always specify the timeInterval value in seconds.
  • If values for both timeInterval and dateTime are provided, timeInterval is given higher precedence.

Example

Fire a notification in the next 300 seconds.


pspconfig:{
“timeInterval”: 300
}

Platform Availability

  • iOS

vibrate


An optional Boolean value that fires a notification with or without the vibration of the device.

Syntax

vibrate

Type

Boolean

Example


pspconfig:{
“vibrate”: ”true”
}

Platform Availability

  • Android

visibility


An optional constant integer value that fires a notification with the given visibility.

Syntax

visibility

Type

int

Supported Values

  • constants.NOTIFICATION_VISIBILITY_PRIVATE: This notification visibility value does not reveal any part of the notification on the secure lock-screen of a user's device.
  • constants.NOTIFICATION_VISIBILITY_PUBLIC: This notification visibility value displays the entire notification on all the lock-screens of a user's device.
  • constants.NOTIFICATION_VISIBILITY_SECRET: This notification visibility value displays the notification on all lock-screens of a user's device, but conceals sensitive or private information on secure lock-screens.
  • You can configure the visibility of notifications at the app level in localnotificationconfig.xml and pushconfig.xml.

  • notify_local_msg_visibilityemptyVisibility for local message notification.
    notify_push_msg_visibilityemptyVisibility for push message notification.

Example


pspconfig:{
“visibility” :  constants.NOTIFICATION_VISIBILITY_PRIVATE 
}

Platform Availability

  • Android