systemPreferences - systemPreferences.checkNotificationEnabled()
概述
返回通知是否授权结果
基本信息
| 属性 | 值 |
|---|---|
| 模块 | systemPreferences |
| 类型 | Method |
| 鸿蒙支持 | 支持 |
OHOS 依赖与基本表现
| 属性 | 值 |
|---|---|
| 系统权限依赖 | 无需申请 |
| 添加JIT权限 | 支持 |
| 坚盾模式 | 支持 |
使用方式差异
| 属性 | 值 |
|---|---|
| 使用方式差异 | 存在差异 |
| 差异说明 | 鸿蒙新增接口 |
Demo
const { systemPreferences } = require('electron')
systemPreferences.checkNotificationEnabled().then((result) => {
console.log('CheckNotificationEnabled result = ' + result)
})