Notification Overview
Introduction
All system applications and services can publish notifications through the notification APIs. Users can view the notifications in the notification panel or click a notification to open the publishing application.
Below are some typical use cases for notifications:
-
Display received SMS messages and instant messages.
-
Display push messages, such as advertisements and version updates.
-
Display ongoing events, such as the download progress.
The Advanced Notification Service (ANS) is used to manage notifications of various types, such as basic notifications and [progress notifications(../notification/progress-bar-notification.md).
Notification Service Process
The notification service process involves the notification subsystem, notification sender, and notification subscriber. A notification is generated by the notification sender and sent to the notification subsystem through inter-process communication (IPC). The notification subsystem then distributes the notification to the notification subscriber.
-
Notification sender: It can be a third-party application or a system application. Pay special attention to this role.
-
Notification subscriber: It can only be a system application, for example, the notification center. By default, the notification center subscribes to notifications sent by all applications on the current device to the current user. You do not need to pay attention to this role.
Figure 1 Notification service process