|
|
|
|
- Overview
- The notifications in the system bar
- Other types of notifications
Android: The different types of notifications
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:
| | NotifAdd | Adds a notification to the system bar (Android) or notification center (iOS). | NotifDelete | Removes a notification from the system bar. | NotifDeleteCategory | Deletes a notification category from the application. | NotifListCategory | Lists the notification categories of the application. | NotifModify | Modifies a notification currently displayed in the system bar of the device. |
- advanced types used to manage the notifications:
| | Notification | The Notification type is used to handle the local notifications or the push notifications. | notificationAction | The notificationAction type is used to describe an additional action associated with a notification. | notificationCategory | The type notificationCategory makes it possible to define all the advanced characteristics of a notification category. | notificationFormat | The 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:
| | VibrationStop | Stops the vibrations of the device (even if they have been triggered by another application). | VibrationTrigger | Triggers 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:
| | LEDSwitchOff | Switches the LED (Light-Emitting Diode) of the device off. | LEDSwitchOn | Switches 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.
The following WLanguage function manages Toast messages:
Related Examples:
|
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
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|