PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Properties specific to the description of notificationFormat variables
  • Various
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
notificationFormat (Type of variable)
In French: notificationFormat
From Android 4.1 (Jelly Bean, api level 16), the notifications displayed in the list of device notifications can be "expanded" in order to display more content (image, multi-line text, etc.).
The displayed notifications are automatically collapsed or expanded by the system according to the available space in the list. However, the user has the ability to collapse or expand a notification by performing a swipe gesture to the top (collapse) or to the bottom (expand) with two fingers.
The notificationFormat type is used to describe the display format of a notification when this one is expanded. The characteristics of this display format can be defined and modified by several WLanguage properties.
To associate a format with a notification, all you have to do is use the ..Format property of Notification type.
Notes:
  • The format will be ignored if the notification is displayed on a device running a version earlier than Android 4.1.
  • See Declaring a variable for more details.
Example
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..Type = notifImageFormat
n..Format..Content = fCurrentDir + "photos/desert.png"
NotifAdd(n)
Remarks

Properties specific to the description of notificationFormat variables

The following properties can be used to handle a notification format:
Property nameType usedEffect
ContentCharacter stringContent of notification to display. The value of this property depends on the type of format used (..Type property).
  • If ..Type is set to notifImageFormat, ..Content corresponds to the path of the image to display.
  • If ..Type is set to notifListFormat, ..Content corresponds to the elements that will be displayed in the list, separated by CR characters (Carriage Return). You have the ability to display up to 5 elements in the list. The additional elements will be ignored.
  • If ..Type is set to notifTextFormat, ..Content corresponds to the multiline text to display. If the specified text is too long, it may be truncated when it is displayed.
LargeIconCharacter 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 this property is not filled, the large icon of notification will be identical to the one used when the notification is collapsed.
This property is taken into account only if ..Type corresponds to the notifImageFormat constant.
SecondaryMessageCharacter stringSecondary message of notification. If this property is not filled, the secondary message of notification will be identical to the one used when the notification is collapsed.
TitleCharacter stringTitle of notification when this one is expanded. If this property is not filled, the notification title will be identical to the one used when the notification is collapsed.
TypeInteger constantType of format that will be applied to the notification when this one is expanded:
  • notifImageFormat: Display an image.
  • notifListFormat: Display a list of elements.
  • notifTextFormat (default value): Display a multiline text.
Note: These properties can be handled by using one of the following syntaxes:
  • <Variable Name>..<Property Name>
  • <Variable Name>.<Property Name>

Various

To reinitialize the content of a notificationFormat variable, you have the ability to use VariableReset.
Minimum required version
  • Version 20
This page is also available for…
Comments
Click [Add] to post a comment