NotificationLevel 枚举(HarmonyOS IMLib)
会话提醒级别枚举:共 3 个取值,定义来自 domain.json → enums.NotificationLevel。
契约预留平台
HarmonyOS 当前为契约预留:本页的类、方法签名、枚举与示例全部来自冻结 IDL 与 sdk-bindings.json,SDK 尚未交付;实现后签名不会变化。
基本信息
| 项 | 值 |
|---|---|
| 枚举 | NotificationLevel |
| 取值数 | 3 |
| 本平台常量名 | NotificationLevel |
| IDL 来源 | domain.json → enums.NotificationLevel |
| 跨端一致性 | 取值跨端一致;常量名与成员名按平台绑定 |
| 平台状态 | 契约预留 |
枚举常量摘要
| 名称 | 值 | 说明 |
|---|---|---|
ALL | 0 | 全部提醒(默认) |
MENTION | 1 | 仅提醒 @ 提及 |
MUTED | 2 | 免打扰(不展示红点与角标) |
使用说明
setConversationNotificationLevel() 的 level 参数,以及 Conversation.notificationLevel 字段。
示例
TypeScript
const value: NotificationLevel = NotificationLevel.ALL;