README.md
1# Notification
2
3### Introduction
4
5This sample shows how to create and delete a slot in eTS, and how to publish and cancel a notification.
6
7### Usage
8
91. Touch **Add slot**. After the slot is added, the message "Add slot succeed" is displayed.
10
112. Select the type of notification you want to publish and touch **Publish notification**. The published notification icon is displayed in the notification panel. You can swipe down the notification panel to view the notification content.
12
133. Swipe down the notification panel, and touch the published notification or the button in the notification to go to the app screen.
14
154. Touch **Cancel the last notification** to cancel the last published notification.
16
175. Touch **Cancel all notification** to cancel all published notifications.
18
19### Constraints
20
21This sample can only be run on standard-system devices.
22
23
README_zh.md
1# 通知
2
3### 简介
4
5本示例展示了在eTS中如何创建和删除Slot通道,如何发布和取消通知。实现效果如下:
6
7
8
9### 相关概念
10
11发布通知:使用 Notification.publish接口发布通知。
12NotificationRequest:设置要发布通知内容的NotificationRequest对象。
13
14### 相关权限
15
16不涉及。
17
18### 使用说明
19
201.在界面中点击**创建Slot通道**,创建完成提示"Add slot succeed"。
21
222.选择要发布的通知类型,点击**发布通知**,在通知栏会看到发布的通知,下拉通知栏后可以看到通知内容。
23
243.在发布通知后,下拉通知栏,在通知消息中,点击通知或通知中的按钮,可以跳转到本应用界面。
25
264.在应用界面点击**取消最近发布的通知**,可以取消最新发布的一条通知。
27
285.点击**取消所有通知**,可以取消所有发布的通知。
29
30### 约束与限制
31
321.本示例支持标准系统上运行。
33
342.本示例需要使用DevEco Studio 3.0 Beta4 (Build Version: 3.0.0.992, built on July 14, 2022)才可编译运行。