PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Properties specific to the description of notificationCategory variables
  • Functions that use the notificationCategory type
  • Reinitialization
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
notificationCatergory (Type of variable)
In french: notificationCatégorie
The type notificationCategory makes it possible to define all the advanced characteristics of a notification category. The notifications of the application can be associated with a notification category. The characteristics of this notification category can be defined and modified using different WLanguage properties.
This type of variable is used by the Notification variables.
Remark: See Declaring a variable for more details on the declaration of this type of variable and the use of WLanguage properties.
Example
// Description of the notification category to use
categoryNotif is NotificationCategory
categoryNotif..Identifier = "ID_NOTIF_COM"
categoryNotif..Name = "Commercial notifications"
categoryNotif..Priority = notifHighPriority

// Add a notification associated with the category
n is Notification
n..Title = "New message"
n..Message = "Order #54781-4551"
n..SecondaryMessage = "customer@company.com"
n..Category = categoryNotif
NotifAdd(n)
Remarks

Properties specific to the description of notificationCategory variables

The following properties can be used to handle a notification category:
Property nameType usedEffect
DisplayLEDBoolean
  • True if the LED of the device must be switched on when the notification is displayed,
  • False (default value) otherwise.
The color of the LED and the frequency of lighting can change from a device to another one.
BadgeEnabledBoolean
  • True (default value) if the notifications of the category should be taken into account to display the application badge.
  • False otherwise.
ColorLEDIntegerColor of LED when displaying the notification.
The value of this property is taken into account only if DisplayLED is set to True.
The display color of the LED is green by default.
This color can correspond to:
Caution: Some devices do not allow you to modify the LED color or they do not propose all the colors. A default color will be used if the specified color is not supported by the device.
DescriptionCharacter stringDescription of the notification category (optional).
IdentifierCharacter stringIdentifier of the category. This property must not be empty. This identifier is unique for the application (case and accent-sensitive).
NameCharacter stringCategory name. This name must not be empty.
PriorityIntegerPriority of notifications associated with the category. The priority of a notification has an influence on how the notification is shown to the user.
In some situations, a notification with a low priority can be hidden to the user if other notifications with higher priorities are received.
This property can take the following values:
  • notifMaxPriority : maximum priority (example: incoming call).
  • notifHighPriority : high priority (example : receiving an urgent email).
  • notifDefaultPriority (default value): standard priority (example: receiving an SMS).
  • notifLowPriority : low priority (example: notification for update).
  • notifMinPriority: minimum priority (example: commercial information).
SoundCharacter stringPath of the sound file to play when displaying the notification.
To play the default sound of notifications, use the notifDefaultSound constant. This default sound can change from a device to another one.
You have the ability to play a sound issued from an audio file included in the application (via the generation wizard): to do so, specify the name of the file and its extension.
To associate no sound with the notification, use an empty string ("", default value).
VibrationBoolean
  • True if the device must vibrate when displaying the notification,
  • False (default value) otherwise.
Remark: The duration and the power of vibrations can change from a device to another one.
VisibleOnLockScreenBoolean
  • True if the notification must be visible in the lock screen,
  • False (default value) otherwise.

Remark: These properties can be handled by using one of the following syntaxes:
  • <Variable name>..<Property name>
  • <Variable name>.<Property name>

Functions that use the notificationCategory type

The following functions manage notificationCategory variables:
Versions 24 and later
NotifDeleteCategory
New in version 24
NotifDeleteCategory
NotifDeleteCategory
Deletes a notification category from the application.
Versions 24 and later
NotifListCategory
New in version 24
NotifListCategory
NotifListCategory
Lists the notification categories of the application.

Reinitialization

To reset the content of a notificationCategory variable, you can use VariableReset.
Minimum version required
  • Version 24
This page is also available for…
Comments
Click [Add] to post a comment