PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Using the Notification type
  • Example of notification in Android
  • Properties specific to the description of Notification variables for a local notification
  • Properties specific to the description of Notification variables for a push notification
  • Functions that use the Notification 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
The Notification type is used to handle
  • AndroidiPhone/iPad the local notifications.
  • Versions 19 and later
    the push notifications.
    New in version 19
    the push notifications.
    the push notifications.
The characteristics of this notification can be defined and modified by several WLanguage properties.
Note: See Declaring a variable for more details.
Versions 19 and later
WINDEVWindows This type of variable is now available for the WINDEV applications (for sending push notifications).
WEBDEV - Server codeWindows This type of variable is now available for the WEBDEV sites (for sending push notifications).
iPhone/iPad This type of variable is now available for the iPhone/iPad applications (local notifications and push notifications).
New in version 19
WINDEVWindows This type of variable is now available for the WINDEV applications (for sending push notifications).
WEBDEV - Server codeWindows This type of variable is now available for the WEBDEV sites (for sending push notifications).
iPhone/iPad This type of variable is now available for the iPhone/iPad applications (local notifications and push notifications).
WINDEVWindows This type of variable is now available for the WINDEV applications (for sending push notifications).
WEBDEV - Server codeWindows This type of variable is now available for the WEBDEV sites (for sending push notifications).
iPhone/iPad This type of variable is now available for the iPhone/iPad applications (local notifications and push notifications).
Example
// Simple notification
// --------------------
notif is Notification
notif..Title = "New incoming message"
notif..Message = "Click here to display the message"
NotifAdd(notif)
Versions 20 and later
Android
// Notification with two additional actions
n is Notification
n..Title = "New message"
n..Message = "Order #54781-4551"
n..SecondaryMessage = "customer@company.com"
n..LargeIcon = "envelope.png"
n..AdditionalAction[1]..ActionLabel = "Respond"
n..AdditionalAction[1]..Icon = "respond.png"
n..AdditionalAction[1]..ActionClick = "procRespond"
n..AdditionalAction[2]..ActionLabel = "Delete"
n..AdditionalAction[2]..Icon = "delete.png"
n..AdditionalAction[2]..ActionClick = "procDelete"
NotifAdd(n)

// Notification while defining a notification format
n is Notification
n..Title = "Photo saved"
n..Message = "Date of snapshot : 07/18/2014 19:45"
n..LargeIcon = "photo.png"
n..SecondaryMessage = "desert.png"
n..Format..Format  = notifImageFormat
n..Format..Content = fCurrentDir + "photos/desert.png"
NotifAdd(n)
New in version 20
Android
// Notification with two additional actions
n is Notification
n..Title = "New message"
n..Message = "Order #54781-4551"
n..SecondaryMessage = "customer@company.com"
n..LargeIcon = "envelope.png"
n..AdditionalAction[1]..ActionLabel = "Respond"
n..AdditionalAction[1]..Icon = "respond.png"
n..AdditionalAction[1]..ActionClick = "procRespond"
n..AdditionalAction[2]..ActionLabel = "Delete"
n..AdditionalAction[2]..Icon = "delete.png"
n..AdditionalAction[2]..ActionClick = "procDelete"
NotifAdd(n)

// Notification while defining a notification format
n is Notification
n..Title = "Photo saved"
n..Message = "Date of snapshot : 07/18/2014 19:45"
n..LargeIcon = "photo.png"
n..SecondaryMessage = "desert.png"
n..Format..Format  = notifImageFormat
n..Format..Content = fCurrentDir + "photos/desert.png"
NotifAdd(n)
Android
// Notification with two additional actions
n is Notification
n..Title = "New message"
n..Message = "Order #54781-4551"
n..SecondaryMessage = "customer@company.com"
n..LargeIcon = "envelope.png"
n..AdditionalAction[1]..ActionLabel = "Respond"
n..AdditionalAction[1]..Icon = "respond.png"
n..AdditionalAction[1]..ActionClick = "procRespond"
n..AdditionalAction[2]..ActionLabel = "Delete"
n..AdditionalAction[2]..Icon = "delete.png"
n..AdditionalAction[2]..ActionClick = "procDelete"
NotifAdd(n)

// Notification while defining a notification format
n is Notification
n..Title = "Photo saved"
n..Message = "Date of snapshot : 07/18/2014 19:45"
n..LargeIcon = "photo.png"
n..SecondaryMessage = "desert.png"
n..Format..Format  = notifImageFormat
n..Format..Content = fCurrentDir + "photos/desert.png"
NotifAdd(n)
Remarks

Example of notification in Android

The different elements of this notification can be configured by the Notification type:
  • Versions 20 and later
    1. Large icon of notification (..LargeIcon).
    New in version 20
    1. Large icon of notification (..LargeIcon).
    1. Large icon of notification (..LargeIcon).
  • 2. Title of notification (..Title).
  • 3. Message of notification (..Message).
  • Versions 20 and later
    4. Secondary message (..SecondaryMessage).
    New in version 20
    4. Secondary message (..SecondaryMessage).
    4. Secondary message (..SecondaryMessage).
  • Versions 20 and later
    5. Time for receiving the notification (..Chronometer).
    New in version 20
    5. Time for receiving the notification (..Chronometer).
    5. Time for receiving the notification (..Chronometer).
  • 6. Icon of application (..Icon).
  • Versions 20 and later
    7. Additional actions of notification (..AdditionalAction).
    New in version 20
    7. Additional actions of notification (..AdditionalAction).
    7. Additional actions of notification (..AdditionalAction).
AndroidiPhone/iPad

Properties specific to the description of Notification variables for a local notification

The following properties can be used to handle a notification:
Property nameType usedEffect
ActionClickValue or name of procedureName of WLanguage procedure called when the user clicks the notification in the drop-down list of notifications displayed on the device.
This procedure has the following format :
PROCEDURE <Procedure Name> (<Notification>)
where <Notification> is a Notification variable corresponding to the notification selected by the user.
If the WLanguage procedure returns True or if it returns no value:
  • Android the notification will be automatically deleted from the system bar.
  • Versions 19 and later
    iPhone/iPad the notification is not deleted from the system bar.
    New in version 19
    iPhone/iPad the notification is not deleted from the system bar.
    iPhone/iPad the notification is not deleted from the system bar.
If the procedure returns False, the notification will still be displayed.
If ..ActionClick corresponds to an empty string (""), no action will be performed during the click and the notification will be automatically erased after the click.
We recommend that you use global procedures. If the procedure is a local procedure, the name of this procedure must be prefixed by the full name of object to which the procedure belongs. For example, for a procedure local to a window: "WIN_Window1.MyProcedure".
Versions 20 and later
AdditionalAction
New in version 20
AdditionalAction
AdditionalAction
Array of NotificationAction variablesAdditional actions associated with the notification.
Caution: The additional actions of notifications are available from Android 4.1 (Jelly Bean, api level 16). The additional actions will be ignored on the devices running an earlier version.
iPhone/iPad This property is not available.
Versions 18 and later
ActivateApplication
New in version 18
ActivateApplication
ActivateApplication
Boolean
  • True if the application must be displayed in the foreground during the click on the notification.
  • False (default value) otherwise.
iPhone/iPad This property is not available.
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.
iPhone/iPad This property is not available.
Versions 19 and later
Badge
New in version 19
Badge
Badge
IntegerNumber displayed by the icon of the application.
Android This property is not available.
Versions 20 and later
Chronometer
New in version 20
Chronometer
Chronometer
Boolean
  • True to display a stopwatch instead of the notification time. The stopwatch will be automatically started when receiving the notification and its display will be automatically refreshed.
  • False (default value) to avoid displaying a stopwatch. The time associated with the notification will be displayed.
Caution: Displaying a stopwatch in the notifications is available from Android 4.1 (Jelly Bean, api level 16). On the devices running an earlier version, the stopwatch will be ignored and the time associated with the notification will be displayed.
iPhone/iPad This property is not available.
Versions 19 and later
Content
New in version 19
Content
Content
Character stringCustom data of notification. This data is not displayed in the notification.
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 corresponds 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.
iPhone/iPad This property is not available.
Versions 19 and later
ActivationDateTime
New in version 19
ActivationDateTime
ActivationDateTime
DateTime or character stringDate and time when the notification must be sent. The notification is sent immediately be default.
Android This property is not available.
Versions 20 and later
Format
New in version 20
Format
Format
NotificationFormatDisplay format of the notification when this one is expanded.
Caution: Displaying the notifications in "expanded" mode is available from Android 4.1 (Jelly Bean, api level 16). The display format will be ignored on the devices running an earlier version.
iPhone/iPad This property is not available.
Versions 20 and later
LargeIcon
New in version 20
LargeIcon
LargeIcon
Character stringPath of image corresponding to the large icon associated with the notification. This icon will be displayed on the left of notification title and message.
If no image is specified, the icon specified by ..Icon will be used. If this one is not specified, the icon of the application will be used.
Caution: Displaying this image in the notifications is available from Android 3.0 (Honeycomb, api level 11). This image will be ignored on the devices running an earlier version.
iPhone/iPad This property is not available.
IconCharacter stringPath of the image corresponding to the icon associated with the notification.
The icon of the application will be used if no icon is specified.
Versions 19 and later
iPhone/iPad Notes:
  • The file used must be found in bundle de of the application. The specified path must be a relative path.
  • The image will be displayed only if the application is not in the foreground (which means if the application is not enabled).
New in version 19
iPhone/iPad Notes:
  • The file used must be found in bundle de of the application. The specified path must be a relative path.
  • The image will be displayed only if the application is not in the foreground (which means if the application is not enabled).
iPhone/iPad Notes:
  • The file used must be found in bundle de of the application. The specified path must be a relative path.
  • The image will be displayed only if the application is not in the foreground (which means if the application is not enabled).
Versions 19 and later
ActionLabel
New in version 19
ActionLabel
ActionLabel
Character stringCaption for the action button of the notification.
Android This property is not available.
Versions 20 and later
Local
New in version 20
Local
Local
Boolean
  • True if the notification is local to the device that receives it: this notification must not be transmitted to the objects operating in Android Wear connected to the device (a watch for example).
  • False (default value) if the notification must be automatically transmitted to the connected objects.
iPhone/iPad This property is not available.
Versions 19 and later
ProgressBarMax
New in version 19
ProgressBarMax
ProgressBarMax
IntegerMaximum value of the progress bar displayed in the notification.
The value will be taken into account only if ..ProgressBarType corresponds to the notifStandardProgressBar constant.
This feature is available from Android 3.0.
iPhone/iPad This property is not available.
MessageCharacter stringMessage of the notification.
Versions 20 and later
SecondaryMessage
New in version 20
SecondaryMessage
SecondaryMessage
Character stringSecondary message displayed below the main message of the notification.
Caution: Displaying a secondary message in the notifications is available from Android 4.1 (Jelly Bean, api level 16). The secondary message will be ignored on the devices running an earlier version.
iPhone/iPad This property is not available.
Versions 20 and later
Priority
New in version 20
Priority
Priority
Integer constantPriority of notification.
Changing the priority of a notification is used to modify its display position in the list of notifications on the device in order for the user to see the most important notifications first. A notification with a high priority will be displayed at the top of the list while a notification with a low priority will be displayed at the end of the list.
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).
Modifying the priorities of notifications is available from Android 4.1 (Jelly Bean, api level 16). The priority will be ignored on the devices running an earlier version: all the notifications have the same priority.
iPhone/iPad This property is not available.
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).
Versions 19 and later
iPhone/iPad Notes:
  • The file used must be found in bundle de of the application. The specified path must be a relative path.
  • The file used must be in "aac" format and its duration must not exceed 30 seconds.
  • The sound will be played only if the application is not in the foreground (which means if the application is not enabled).
New in version 19
iPhone/iPad Notes:
  • The file used must be found in bundle de of the application. The specified path must be a relative path.
  • The file used must be in "aac" format and its duration must not exceed 30 seconds.
  • The sound will be played only if the application is not in the foreground (which means if the application is not enabled).
iPhone/iPad Notes:
  • The file used must be found in bundle de of the application. The specified path must be a relative path.
  • The file used must be in "aac" format and its duration must not exceed 30 seconds.
  • The sound will be played only if the application is not in the foreground (which means if the application is not enabled).
Versions 18 and later
Deletable
New in version 18
Deletable
Deletable
Boolean
  • True (default value) if the notification can be deleted by the user,
  • False otherwise.
If this property is set to False, the notification will be erased in the following cases:
  • Closing the application.
  • Call to NotifDelete.
  • If the WLanguage procedure run during the click (..ActionClick) returned True or returned no value.
iPhone/iPad This property is not available.
DropDownTextCharacter stringDrop-down text briefly displayed in the system bar when displaying the notification.
No message will be displayed if this property corresponds to an empty string ("", default value).
iPhone/iPad This property is not available.
TitleCharacter stringTitle of the notification.
The name of the application will be used if no title is specified.
iPhone/iPad This property is not available.
Versions 19 and later
ProgressBarType
New in version 19
ProgressBarType
ProgressBarType
Integer constantType of progress bar displayed in the notification:
  • notifInfiniteProgressBar: an infinite progress bar will be displayed in the notification.
  • notifNoProgressBar (default value): no progress bar will be displayed in the notification.
  • notifStandardProgressBar: a standard progress bar will be displayed in the notification. The value and the bound of this progress bar can be defined by ..ProgressBarMax and ..ProgressBarValue respectively.
This feature is available from Android 3.0.
iPhone/iPad This property is not available.
Versions 19 and later
ProgressBarValue
New in version 19
ProgressBarValue
ProgressBarValue
IntegerCurrent value of the progress bar displayed in the notification.
The value will be taken into account only if ..ProgressBarType corresponds to the notifStandardProgressBar constant.
This feature is available from Android 3.0.
iPhone/iPad This property is not available.
VibrationBoolean
  • True if the device must vibrate when displaying the notification,
  • False (default value) otherwise.
Note: The duration and the power of vibrations can change from a device to another one.
iPhone/iPad This property is not available.
Note: These properties can be used with one of the following syntaxes:
  • <Variable Name>..<Property Name>
  • <Variable Name>.<Property Name>
Versions 19 and later

Properties specific to the description of Notification variables for a push notification

The following properties can be used to handle a notification:
Property nameType usedEffect
Versions 18 and later
ActivateApplication
New in version 18
ActivateApplication
ActivateApplication
Boolean
  • True if the application must be displayed in the foreground during the click on the notification.
  • False (default value) otherwise.
iPhone/iPad This property is not available.
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.
iPhone/iPad This property is not available.
Versions 19 and later
Badge
New in version 19
Badge
Badge
IntegerNumber displayed by the icon of the application.
Android This property is not available.
Versions 20 and later
Chronometer
New in version 20
Chronometer
Chronometer
Boolean
  • True to display a stopwatch instead of the notification time. The stopwatch will be automatically started when receiving the notification and its display will be automatically refreshed.
  • False (default value) to avoid displaying a stopwatch. The time associated with the notification will be displayed.
Caution: Displaying a stopwatch in the notifications is available from Android 4.1 (Jelly Bean, api level 16). On the devices running an earlier version, the stopwatch will be ignored and the time associated with the notification will be displayed.
iPhone/iPad This property is not available.
Versions 19 and later
Content
New in version 19
Content
Content
Character stringCustom data of notification. This data is not displayed in the notification.
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 corresponds 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.
iPhone/iPad This property is not available.
Versions 20 and later
Format
New in version 20
Format
Format
NotificationFormatDisplay format of the notification when this one is expanded.
Caution: Displaying the notifications in "expanded" mode is available from Android 4.1 (Jelly Bean, api level 16). The display format will be ignored on the devices running an earlier version.
iPhone/iPad This property is not available.
Versions 20 and later
LargeIcon
New in version 20
LargeIcon
LargeIcon
Character stringPath of image corresponding to the large icon associated with the notification. This icon will be displayed on the left of notification title and message.
If no image is specified, the icon specified by ..Icon will be used. If this one is not specified, the icon of the application will be used.
Caution: Displaying this image in the notifications is available for the devices running Android 3.0 (Honeycomb, api level 11) or later. This image will be ignored on the devices running an earlier version.
iPhone/iPad This property is not available.
Versions 19 and later
Group
New in version 19
Group
Group
Character stringName of the group to which the push notification is associated.
If several push notifications belonging to the same group are sent with an identical content while the destination device cannot be reached, only the last notification of the group will be sent when the device can be contacted again by the Google Cloud Messaging server.
iPhone/iPad This property is not available.
IconCharacter stringPath of the image corresponding to the icon associated with the notification.
The icon of the application will be used if no icon is specified.
Versions 19 and later
ActionLabel
New in version 19
ActionLabel
ActionLabel
Character stringCaption for the action button of the notification.
Android This property is not available.
Versions 20 and later
Local
New in version 20
Local
Local
Boolean
  • True if the notification is local to the device that receives it: this notification must not be transmitted to the objects operating in Android Wear connected to the device (a watch for example).
  • False (default value) if the notification must be automatically transmitted to the connected objects.
iPhone/iPad This property is not available.
MessageCharacter stringMessage of the notification.
Versions 20 and later
SecondaryMessage
New in version 20
SecondaryMessage
SecondaryMessage
Character stringSecondary message displayed below the main message of the notification.
Caution: Displaying a secondary message in the notifications is available from Android 4.1 (Jelly Bean, api level 16). The secondary message will be ignored on the devices running an earlier version.
iPhone/iPad This property is not available.
Versions 20 and later
Priority
New in version 20
Priority
Priority
Integer constantPriority of notification.
Changing the priority of a notification is used to modify its display position in the list of notifications on the device in order for the user to see the most important notifications first. A notification with a high priority will be displayed at the top of the list while a notification with a low priority will be displayed at the end of the list.
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).
Modifying the priorities of notifications is available from Android 4.1 (Jelly Bean, api level 16). The priority will be ignored on the devices running an earlier version: all the notifications have the same priority.
iPhone/iPad This property is not available.
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).
Versions 18 and later
Deletable
New in version 18
Deletable
Deletable
Boolean
  • True (default value) if the notification can be deleted by the user,
  • False otherwise.
If this property is set to False, the notification will be erased in the following cases:
  • Closing the application.
  • Call to NotifDelete.
  • If the WLanguage procedure run during the click (..ActionClick) returned True or returned no value.
iPhone/iPad This property is not available.
DropDownTextCharacter stringDrop-down text briefly displayed in the system bar when displaying the notification.
No message will be displayed if this property corresponds to an empty string ("", default value).
iPhone/iPad This property is not available.
TitleCharacter stringTitle of the notification.
The name of the application will be used if no title is specified.
iPhone/iPad This property is not available.
VibrationBoolean
  • True if the device must vibrate when displaying the notification,
  • False (default value) otherwise.
Note: The duration and the power of vibrations can change from a device to another one.
iPhone/iPad This property is not available.
Note: These properties can be used with one of the following syntaxes:
  • <Variable Name>..<Property Name>
  • <Variable Name>.<Property Name>
New in version 19

Properties specific to the description of Notification variables for a push notification

The following properties can be used to handle a notification:
Property nameType usedEffect
Versions 18 and later
ActivateApplication
New in version 18
ActivateApplication
ActivateApplication
Boolean
  • True if the application must be displayed in the foreground during the click on the notification.
  • False (default value) otherwise.
iPhone/iPad This property is not available.
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.
iPhone/iPad This property is not available.
Versions 19 and later
Badge
New in version 19
Badge
Badge
IntegerNumber displayed by the icon of the application.
Android This property is not available.
Versions 20 and later
Chronometer
New in version 20
Chronometer
Chronometer
Boolean
  • True to display a stopwatch instead of the notification time. The stopwatch will be automatically started when receiving the notification and its display will be automatically refreshed.
  • False (default value) to avoid displaying a stopwatch. The time associated with the notification will be displayed.
Caution: Displaying a stopwatch in the notifications is available from Android 4.1 (Jelly Bean, api level 16). On the devices running an earlier version, the stopwatch will be ignored and the time associated with the notification will be displayed.
iPhone/iPad This property is not available.
Versions 19 and later
Content
New in version 19
Content
Content
Character stringCustom data of notification. This data is not displayed in the notification.
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 corresponds 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.
iPhone/iPad This property is not available.
Versions 20 and later
Format
New in version 20
Format
Format
NotificationFormatDisplay format of the notification when this one is expanded.
Caution: Displaying the notifications in "expanded" mode is available from Android 4.1 (Jelly Bean, api level 16). The display format will be ignored on the devices running an earlier version.
iPhone/iPad This property is not available.
Versions 20 and later
LargeIcon
New in version 20
LargeIcon
LargeIcon
Character stringPath of image corresponding to the large icon associated with the notification. This icon will be displayed on the left of notification title and message.
If no image is specified, the icon specified by ..Icon will be used. If this one is not specified, the icon of the application will be used.
Caution: Displaying this image in the notifications is available for the devices running Android 3.0 (Honeycomb, api level 11) or later. This image will be ignored on the devices running an earlier version.
iPhone/iPad This property is not available.
Versions 19 and later
Group
New in version 19
Group
Group
Character stringName of the group to which the push notification is associated.
If several push notifications belonging to the same group are sent with an identical content while the destination device cannot be reached, only the last notification of the group will be sent when the device can be contacted again by the Google Cloud Messaging server.
iPhone/iPad This property is not available.
IconCharacter stringPath of the image corresponding to the icon associated with the notification.
The icon of the application will be used if no icon is specified.
Versions 19 and later
ActionLabel
New in version 19
ActionLabel
ActionLabel
Character stringCaption for the action button of the notification.
Android This property is not available.
Versions 20 and later
Local
New in version 20
Local
Local
Boolean
  • True if the notification is local to the device that receives it: this notification must not be transmitted to the objects operating in Android Wear connected to the device (a watch for example).
  • False (default value) if the notification must be automatically transmitted to the connected objects.
iPhone/iPad This property is not available.
MessageCharacter stringMessage of the notification.
Versions 20 and later
SecondaryMessage
New in version 20
SecondaryMessage
SecondaryMessage
Character stringSecondary message displayed below the main message of the notification.
Caution: Displaying a secondary message in the notifications is available from Android 4.1 (Jelly Bean, api level 16). The secondary message will be ignored on the devices running an earlier version.
iPhone/iPad This property is not available.
Versions 20 and later
Priority
New in version 20
Priority
Priority
Integer constantPriority of notification.
Changing the priority of a notification is used to modify its display position in the list of notifications on the device in order for the user to see the most important notifications first. A notification with a high priority will be displayed at the top of the list while a notification with a low priority will be displayed at the end of the list.
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).
Modifying the priorities of notifications is available from Android 4.1 (Jelly Bean, api level 16). The priority will be ignored on the devices running an earlier version: all the notifications have the same priority.
iPhone/iPad This property is not available.
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).
Versions 18 and later
Deletable
New in version 18
Deletable
Deletable
Boolean
  • True (default value) if the notification can be deleted by the user,
  • False otherwise.
If this property is set to False, the notification will be erased in the following cases:
  • Closing the application.
  • Call to NotifDelete.
  • If the WLanguage procedure run during the click (..ActionClick) returned True or returned no value.
iPhone/iPad This property is not available.
DropDownTextCharacter stringDrop-down text briefly displayed in the system bar when displaying the notification.
No message will be displayed if this property corresponds to an empty string ("", default value).
iPhone/iPad This property is not available.
TitleCharacter stringTitle of the notification.
The name of the application will be used if no title is specified.
iPhone/iPad This property is not available.
VibrationBoolean
  • True if the device must vibrate when displaying the notification,
  • False (default value) otherwise.
Note: The duration and the power of vibrations can change from a device to another one.
iPhone/iPad This property is not available.
Note: These properties can be used with one of the following syntaxes:
  • <Variable Name>..<Property Name>
  • <Variable Name>.<Property Name>

Properties specific to the description of Notification variables for a push notification

The following properties can be used to handle a notification:
Property nameType usedEffect
Versions 18 and later
ActivateApplication
New in version 18
ActivateApplication
ActivateApplication
Boolean
  • True if the application must be displayed in the foreground during the click on the notification.
  • False (default value) otherwise.
iPhone/iPad This property is not available.
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.
iPhone/iPad This property is not available.
Versions 19 and later
Badge
New in version 19
Badge
Badge
IntegerNumber displayed by the icon of the application.
Android This property is not available.
Versions 20 and later
Chronometer
New in version 20
Chronometer
Chronometer
Boolean
  • True to display a stopwatch instead of the notification time. The stopwatch will be automatically started when receiving the notification and its display will be automatically refreshed.
  • False (default value) to avoid displaying a stopwatch. The time associated with the notification will be displayed.
Caution: Displaying a stopwatch in the notifications is available from Android 4.1 (Jelly Bean, api level 16). On the devices running an earlier version, the stopwatch will be ignored and the time associated with the notification will be displayed.
iPhone/iPad This property is not available.
Versions 19 and later
Content
New in version 19
Content
Content
Character stringCustom data of notification. This data is not displayed in the notification.
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 corresponds 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.
iPhone/iPad This property is not available.
Versions 20 and later
Format
New in version 20
Format
Format
NotificationFormatDisplay format of the notification when this one is expanded.
Caution: Displaying the notifications in "expanded" mode is available from Android 4.1 (Jelly Bean, api level 16). The display format will be ignored on the devices running an earlier version.
iPhone/iPad This property is not available.
Versions 20 and later
LargeIcon
New in version 20
LargeIcon
LargeIcon
Character stringPath of image corresponding to the large icon associated with the notification. This icon will be displayed on the left of notification title and message.
If no image is specified, the icon specified by ..Icon will be used. If this one is not specified, the icon of the application will be used.
Caution: Displaying this image in the notifications is available for the devices running Android 3.0 (Honeycomb, api level 11) or later. This image will be ignored on the devices running an earlier version.
iPhone/iPad This property is not available.
Versions 19 and later
Group
New in version 19
Group
Group
Character stringName of the group to which the push notification is associated.
If several push notifications belonging to the same group are sent with an identical content while the destination device cannot be reached, only the last notification of the group will be sent when the device can be contacted again by the Google Cloud Messaging server.
iPhone/iPad This property is not available.
IconCharacter stringPath of the image corresponding to the icon associated with the notification.
The icon of the application will be used if no icon is specified.
Versions 19 and later
ActionLabel
New in version 19
ActionLabel
ActionLabel
Character stringCaption for the action button of the notification.
Android This property is not available.
Versions 20 and later
Local
New in version 20
Local
Local
Boolean
  • True if the notification is local to the device that receives it: this notification must not be transmitted to the objects operating in Android Wear connected to the device (a watch for example).
  • False (default value) if the notification must be automatically transmitted to the connected objects.
iPhone/iPad This property is not available.
MessageCharacter stringMessage of the notification.
Versions 20 and later
SecondaryMessage
New in version 20
SecondaryMessage
SecondaryMessage
Character stringSecondary message displayed below the main message of the notification.
Caution: Displaying a secondary message in the notifications is available from Android 4.1 (Jelly Bean, api level 16). The secondary message will be ignored on the devices running an earlier version.
iPhone/iPad This property is not available.
Versions 20 and later
Priority
New in version 20
Priority
Priority
Integer constantPriority of notification.
Changing the priority of a notification is used to modify its display position in the list of notifications on the device in order for the user to see the most important notifications first. A notification with a high priority will be displayed at the top of the list while a notification with a low priority will be displayed at the end of the list.
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).
Modifying the priorities of notifications is available from Android 4.1 (Jelly Bean, api level 16). The priority will be ignored on the devices running an earlier version: all the notifications have the same priority.
iPhone/iPad This property is not available.
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).
Versions 18 and later
Deletable
New in version 18
Deletable
Deletable
Boolean
  • True (default value) if the notification can be deleted by the user,
  • False otherwise.
If this property is set to False, the notification will be erased in the following cases:
  • Closing the application.
  • Call to NotifDelete.
  • If the WLanguage procedure run during the click (..ActionClick) returned True or returned no value.
iPhone/iPad This property is not available.
DropDownTextCharacter stringDrop-down text briefly displayed in the system bar when displaying the notification.
No message will be displayed if this property corresponds to an empty string ("", default value).
iPhone/iPad This property is not available.
TitleCharacter stringTitle of the notification.
The name of the application will be used if no title is specified.
iPhone/iPad This property is not available.
VibrationBoolean
  • True if the device must vibrate when displaying the notification,
  • False (default value) otherwise.
Note: The duration and the power of vibrations can change from a device to another one.
iPhone/iPad This property is not available.
Note: These properties can be used with one of the following syntaxes:
  • <Variable Name>..<Property Name>
  • <Variable Name>.<Property Name>

Functions that use the Notification type

The following functions handle the Notification variables for a local notification:
Versions 16 and later
NotifAdd
New in version 16
NotifAdd
NotifAdd
Adds a notification into the system bar of device (Android) or into the notification center (iOS).
Versions 16 and later
NotifDelete
New in version 16
NotifDelete
NotifDelete
Deletes a notification displayed in the system bar of the device.
Versions 16 and later
NotifModify
New in version 16
NotifModify
NotifModify
Modifies a notification currently displayed in the system bar of the device.
Versions 19 and later
NotifPushSend
New in version 19
NotifPushSend
NotifPushSend
Sends a push notification to a mobile device (iOS or Android).
Versions 18 and later
ThreadPersistent
New in version 18
ThreadPersistent
ThreadPersistent
Makes a thread persistent.

Reinitialization

To reinitialize the content of a Notification variable, you have the ability to use VariableReset.
Related Examples:
Android Push Cross-platform examples (WINDEV Mobile): Android Push
[ + ] This example explains how to receive Push notifications on Android.

It calls the PushNotifActive function and returns the identifier to the WINDEV "WD Push Server" example that stores it.

Then, this identifier is read by the WINDEV "WD Send Push" example that sends the Push notifications to this Android example.
iOS Push Cross-platform examples (WINDEV Mobile): iOS Push
[ + ] This example explains how to receive Push notifications on iOS.

It calls the PushNotifActive function and returns the identifier to the WINDEV "WD Push Server" example that stores it.

Then, this identifier is read by the WINDEV "WD Sending Push" example that sends the Push notifications to this iOS example.
WD Send Push Cross-platform examples (WINDEV Mobile): WD Send Push
[ + ] This example is used to send push notifications on Android and iOS devices.

It retrieves the identifiers of the mobile devices in the HFSQL database of the "WD Push Server" example then it sends the notifications via NotifPushSend.
Android System Android (WINDEV Mobile): Android System
[ + ] This application is a tutorial example presenting some of the new features of WINDEV Mobile for Android.
The following system functions are used:
- NFC
- Multimedia control
- Brightness
- Volume
- WIFI
- Bluetooth
- Toast
- Progress Bar control
- 9-image mode
- Compass
- Accelerometer
- Camera control
- LED
- Vibrations
- Notifications
- Drawing functions
- Internet
iOS System iPhone/iPad (WINDEV Mobile): iOS System
[ + ] This application is an example presenting the use of various features.
The features are as follows:
- Playing videos
- Trace in the logs
- Slider
- Popup control
- Hourglass
...
Minimum required version
  • Version 16
This page is also available for…
Comments
Click [Add] to post a comment