core
正在准备搜索索引...
YmxNotification
接口 YmxNotification
通知
interface
YmxNotification
{
getBadgeNumber
()
:
Promise
<
BadgeNumber
>
;
isNotificationEnabled
()
:
Promise
<
NotificationEnabledResult
>
;
openNotificationSettings
()
:
Promise
<
void
>
;
requestEnableNotification
()
:
Promise
<
void
>
;
setBadgeNumber
(
data
:
BadgeNumber
)
:
Promise
<
void
>
;
}
层级 (
查看层级一览
)
YmxNotification
Ymx
索引
方法
get
Badge
Number
is
Notification
Enabled
open
Notification
Settings
request
Enable
Notification
set
Badge
Number
方法
get
Badge
Number
getBadgeNumber
()
:
Promise
<
BadgeNumber
>
获取角标
返回
Promise
<
BadgeNumber
>
is
Notification
Enabled
isNotificationEnabled
()
:
Promise
<
NotificationEnabledResult
>
获取通知允许状态
返回
Promise
<
NotificationEnabledResult
>
open
Notification
Settings
openNotificationSettings
()
:
Promise
<
void
>
打开通知设置
返回
Promise
<
void
>
request
Enable
Notification
requestEnableNotification
()
:
Promise
<
void
>
请求允许通知
如果用户明确拒绝了通知,再次调用请求允许通知时无效,需要去系统设置里面手动允许通知。
返回
Promise
<
void
>
set
Badge
Number
setBadgeNumber
(
data
:
BadgeNumber
)
:
Promise
<
void
>
设置角标,需要
允许通知
才会显示角标
参数
data
:
BadgeNumber
返回
Promise
<
void
>
显示设置
成员可见性
受保护
继承
外部
配色
自动
浅色
深色
目录
方法
get
Badge
Number
is
Notification
Enabled
open
Notification
Settings
request
Enable
Notification
set
Badge
Number
core
加载中……
通知