ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Mobile specific functions / Phone functions
  • Properties specific to the description of notificationFormat variables
  • Miscellaneous
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
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, multiline 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 describes the display format of a notification when it is expanded. The characteristics of the display format can be defined and changed using different WLanguage properties.
To associate a format with a notification, use the Format property of the Notification type.
Remarks:
  • The format will be ignored if the notification is displayed on a device running a version earlier than Android 4.1.
  • For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
Example
n is Notification
n.Title = "Photo saved"
n.Message = "Date taken: 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 the Type property is set to notifImageFormat, the Content property corresponds to the path of the image to be displayed.
  • If the Type property is set to notifListFormat, the Content property corresponds to the elements to be displayed in the list, separated by carriage returns (CR). You have the ability to display up to 5 elements in the list. The additional elements will be ignored.
  • If the Type property is set to notifTextFormat, the Content property corresponds to the multiline text to be displayed. 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 to the left of the 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 the Type property is set to notifImageFormat.
SecondaryMessageCharacter stringSecondary message of the 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.

Miscellaneous

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

Last update: 05/26/2022

Send a report | Local help