ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Mobile specific functions / Phone functions
  • Overview
  • The notifications in the system bar
  • Other types of notifications
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
Overview
Android proposes several types of notifications to inform the user:
WINDEV Mobile allows you to use these different modes of notifications.
The notifications in the system bar
The notifications found at the top of the Android home screen are notifications by icons.
They ca be expanded to show their details.
To create and handle these notifications, WINDEV Mobile proposes:
  • WLanguage functions:
    NotifAddAdds a notification into the system bar of device (Android) or into the notification center (iOS).
    NotifDeleteDeletes a notification displayed in the system bar of the device.
    NotifDeleteCategoryDeletes a notification category from the application.
    NotifListCategoryLists the notification categories of the application.
    NotifModifyModifies a notification currently displayed in the system bar of the device.
  • advanced types used to manage the notifications:
    NotificationThe Notification type is used to handle the local notifications or the push notifications.
    notificationActionThe notificationAction type is used to describe an additional action associated with a notification.
    notificationCategoryThe type notificationCategory makes it possible to define all the advanced characteristics of a notification category.
    notificationFormatThe notificationFormat type is used to describe the display format of a notification when this one is expanded.
You have the ability to add and delete icons (and their details) to/from the notification bar, to perform sound notifications, vibrations and to switch the LED on.
New notification behavior: using notification categories:
From Android 8.0 (Oreo, API level 26), all the notifications created by an Android application must be associated with a notification category also known as "channel".
Categories allow you to group notifications by "theme" (or another grouping criterion the developer decides to apply). Each notification category consists of an identifier, a name, a description, a level of priority and a set of visual and audio settings (sound, vibration, led color). When a notification is associated with a category, it automatically "inherits" its characteristics.
The end user can locally modify the notification settings of an application: enable/disable the notification display for the category, modify the notification priority, associate a particular sound, etc. These modifications are made from the application's notification settings screen:
Other types of notifications
WINDEV Mobile proposes other types of notifications.
1. Vibration notifications
Vibration notifications make the device vibrate to alert the user.
Several WLanguage functions are used to manage this type of notification:
VibrationStopStops the vibrations of the device (even if they have been triggered by another application).
VibrationTriggerTriggers the vibrations of the device.
2. LED notifications
LED notifications make the devices blink. On some devices, you also have the ability to change the color of the LED.
Several WLanguage functions are used to manage this type of notification:
LEDSwitchOffSwitches the LED (Light-Emitting Diode) of the device off.
LEDSwitchOnSwitches the LED (Light-Emitting Diode) of the device on.
3. Toast notifications
A Toast is a furtive message that appears in the middle or at the bottom of the screen to inform the user. The user does not have to validate the message: this one is displayed during a specified period of time.
Toast messages
The following WLanguage function manages Toast messages:
ToastDisplayDisplays a "Toast" message.
Related Examples:
WM System Cross-platform examples (WINDEV Mobile): WM System
[ + ] This application is an example of some of the features of WINDEV Mobile available for Android/iOS.
The following system functions are used:
- NFC
- Multimedia control
- Brightness
- Volume
- Wi-Fi
- Bluetooth
- Toast
- Compass
- Accelerometer
- Camera control
- LED
- Vibration
- Notifications
- Drawing functions
- Internet
WM Push Cross-platform examples: WM Push
[ + ] This example shows how to receive Push notifications.
It calls the PushNotifActive function and returns the identifier to "WD Push Server", which stores it.
Then, the "Send Push" example reads this identifier and sends Push notifications to this example.
Minimum version required
  • Version 16
Comments
Click [Add] to post a comment

Last update: 06/23/2023

Send a report | Local help