• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Introduction to Notification Kit
2
3With Notification Kit, you can swiftly publish local notifications from your application, which can be displayed in various system windows, such as notification panel, banners, lock screen, and Always On Display (AOD) – a convenient way to interact with the user outside of the application screen.
4
5## When to Use
6
7Typically, you can use local notifications to:
8
9- Display received instant messages and SMS messages.
10- Display ongoing events, such as the download progress.
11
12## Working Principles
13
14The 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)](../connectivity/ipc-rpc-overview.md). The notification subsystem then distributes the notification to the notification subscriber.
15
16* Notification sender: It can be a third-party application or a system application. Pay special attention to this role.
17
18* 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.
19
20**Figure 1** Notification service process
21
22![en-us_image_0000001466582017](figures/en-us_image_0000001466582017.png)
23
24
25## Capability Scope
26
27- Various types of notifications
28- A range of notification slots for publishing notifications, which can be easily managed, for example, adding or deleting a notification slot and checking the enabled status
29- Easy management of published notifications, for example, canceling published notifications and querying all published notifications
30- Requesting notification authorization and checking notification authorization status
31- Notification badge management
32- Management of wants for notification touches, such as redirecting the user to a UIAbility or publishing a custom common event.
33
34
35## Relationship with Related Kits
36
37- Notifications created by Notification Kit are displayed in the notification panel in real time. To publish scheduled notifications when your application is in the background or is not running, you can use BackGroundTask Kit. For example, you can use it to publish a flash sale reminder for your shopping application. Currently, the notification reminder feature is available for countdown, calendar, and alarm events.
38- You can use Push Kit to push remote notifications to the local device.
39- You can use Ability Kit to set wants for notification touches.
40
41
42## Constraints
43
44- There is a limit on the number of notifications per application in the system windows. The current limit is 24.
45- A basic notification cannot exceed 200 KB (due to cross-process serialization).
46- The total number of notifications published by all system applications cannot exceed 10 per second.
47
48