ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Mobile specific functions / Phone functions
  • Properties specific to notificationCategory variables
  • Functions that use the notificationCategory type
  • Reinitialization
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
notificationCategory (Variable type)
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. You can define and change the characteristics of this notification category using different WLanguage properties.
This type of variable is used by Notification variables.
Note: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
Example
// Description de la catégorie de notification à utiliser
catégorieNotif is notificationCategory
catégorieNotif.Identifier = "ID_NOTIF_COM"
catégorieNotif.Name = "Notifications commerciales"
catégorieNotif.Priority = notifHighPriority

// Ajout d'une notification associée à la catégorie
n is Notification
n.Title = "Nouveau message"
n.Message = "Commande n°54781-4551"
n.SecondaryMessage = "client@societe.com"
n.Category = catégorieNotif
NotifAdd(n)
Properties

Properties specific to notificationCategory variables

The following properties can be used to handle a notification category:
Property nameType usedEffect
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 LED color changes or only offer certain colors.. A default color will be used if the specified color is not supported by the device.
DescriptionCharacter stringDescription of the notification category (optional).
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.
IdentifierCharacter stringIdentifier of the category. This property must not be empty. This identifier is unique for the application (case and accent-sensitive).
Name Character stringName of the category. 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:
  • notifPriorityMax maximum priority (example: incoming call).
  • highprioritynotification High priority (e.g. receipt of an urgent Email).
  • notifPriorityDefault (default value): normal priority (example: receiving an SMS).
  • notifPriorityLow Low priority (e.g. update notification).
  • notifPriorityMin 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.
It is possible to play a sound from an audio file integrated into the application (via the generation wizard): simply enter the file name and 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.
Note: Vibration duration and strength may vary from one device to another.
VisibleOnLockScreenBoolean
  • True if the notification must be visible in the lock screen,
  • False (default value) otherwise.
Remarks

Functions that use the notificationCategory type

The following functions manage notificationCategory variables:
NotifDeleteCategoryDeletes a notification category from the application.
NotifListCategoryLists the notification categories of the application.

Reinitialization

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

Last update: 03/27/2025

Send a report | Local help