Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Tonvia
Docs
提交
bf87c6e6
D
Docs
项目概览
Tonvia
/
Docs
与 Fork 源项目一致
Fork自
OpenHarmony / Docs
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Docs
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
bf87c6e6
编写于
2月 25, 2022
作者:
O
openharmony_ci
提交者:
Gitee
2月 25, 2022
浏览文件
操作
浏览文件
下载
差异文件
!1646 修复通知示例代码
Merge pull request !1646 from zengsiyu/dev
上级
e6a42258
d5d3b68e
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
47 addition
and
47 deletion
+47
-47
zh-cn/application-dev/reference/apis/js-apis-notification.md
zh-cn/application-dev/reference/apis/js-apis-notification.md
+47
-47
未找到文件。
zh-cn/application-dev/reference/apis/js-apis-notification.md
浏览文件 @
bf87c6e6
...
@@ -41,7 +41,7 @@ function publishCallback(err) {
...
@@ -41,7 +41,7 @@ function publishCallback(err) {
var
notificationRequest
=
{
var
notificationRequest
=
{
id
:
1
,
id
:
1
,
content
:
{
content
:
{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
contentType
:
Notification
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
normal
:
{
title
:
"
test_title
"
,
title
:
"
test_title
"
,
text
:
"
test_text
"
,
text
:
"
test_text
"
,
...
@@ -71,7 +71,7 @@ Notification.publish(notificationRequest, publishCallback)
...
@@ -71,7 +71,7 @@ Notification.publish(notificationRequest, publishCallback)
var
notificationRequest
=
{
var
notificationRequest
=
{
notificationId
:
1
,
notificationId
:
1
,
content
:
{
content
:
{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
contentType
:
Notification
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
normal
:
{
title
:
"
test_title
"
,
title
:
"
test_title
"
,
text
:
"
test_text
"
,
text
:
"
test_text
"
,
...
@@ -79,7 +79,7 @@ var notificationRequest = {
...
@@ -79,7 +79,7 @@ var notificationRequest = {
}
}
}
}
}
}
Notification
.
publish
(
notificationRequest
).
then
((
void
)
=>
{
Notification
.
publish
(
notificationRequest
).
then
(()
=>
{
console
.
info
(
"
==========================>publishCallback=======================>
"
);
console
.
info
(
"
==========================>publishCallback=======================>
"
);
});
});
...
@@ -137,7 +137,7 @@ Notification.cancel(0, "label", cancelCallback)
...
@@ -137,7 +137,7 @@ Notification.cancel(0, "label", cancelCallback)
-
示例
-
示例
```
js
```
js
Notification
.
cancel
(
0
).
then
((
void
)
=>
{
Notification
.
cancel
(
0
).
then
(()
=>
{
console
.
info
(
"
==========================>cancelCallback=======================>
"
);
console
.
info
(
"
==========================>cancelCallback=======================>
"
);
});
});
```
```
...
@@ -193,10 +193,10 @@ Notification.cancel(0, cancelCallback)
...
@@ -193,10 +193,10 @@ Notification.cancel(0, cancelCallback)
```
js
```
js
//cancel回调
//cancel回调
function
cancelAllback
(
err
)
{
function
cancelAll
Call
back
(
err
)
{
console
.
info
(
"
==========================>cancelAllback=======================>
"
);
console
.
info
(
"
==========================>cancelAll
Call
back=======================>
"
);
}
}
Notification
.
cancelAll
(
cancelCallback
)
Notification
.
cancelAll
(
cancel
All
Callback
)
```
```
...
@@ -218,8 +218,8 @@ Notification.cancelAll(cancelCallback)
...
@@ -218,8 +218,8 @@ Notification.cancelAll(cancelCallback)
-
示例
-
示例
```
js
```
js
Notification
.
cancelAll
().
then
((
void
)
=>
{
Notification
.
cancelAll
().
then
(()
=>
{
console
.
info
(
"
==========================>cancelAllback=======================>
"
);
console
.
info
(
"
==========================>cancelAll
Call
back=======================>
"
);
});
});
```
```
...
@@ -281,7 +281,7 @@ Notification.addSlot(notificationSlot, addSlotCallBack)
...
@@ -281,7 +281,7 @@ Notification.addSlot(notificationSlot, addSlotCallBack)
var
notificationSlot
=
{
var
notificationSlot
=
{
type
:
Notification
.
SlotType
.
SOCIAL_COMMUNICATION
type
:
Notification
.
SlotType
.
SOCIAL_COMMUNICATION
}
}
Notification
.
addSlot
(
notificationSlot
).
then
((
void
)
=>
{
Notification
.
addSlot
(
notificationSlot
).
then
(()
=>
{
console
.
info
(
"
==========================>addSlotCallback=======================>
"
);
console
.
info
(
"
==========================>addSlotCallback=======================>
"
);
});
});
```
```
...
@@ -336,7 +336,7 @@ Notification.addSlot(Notification.SlotType.SOCIAL_COMMUNICATION, addSlotCallBack
...
@@ -336,7 +336,7 @@ Notification.addSlot(Notification.SlotType.SOCIAL_COMMUNICATION, addSlotCallBack
-
示例
-
示例
```
js
```
js
Notification
.
addSlot
(
Notification
.
SlotType
.
SOCIAL_COMMUNICATION
).
then
((
void
)
=>
{
Notification
.
addSlot
(
Notification
.
SlotType
.
SOCIAL_COMMUNICATION
).
then
(()
=>
{
console
.
info
(
"
==========================>addSlotCallback=======================>
"
);
console
.
info
(
"
==========================>addSlotCallback=======================>
"
);
});
});
```
```
...
@@ -407,7 +407,7 @@ var notificationSlot = {
...
@@ -407,7 +407,7 @@ var notificationSlot = {
var
notificationSlotArray
=
new
Array
();
var
notificationSlotArray
=
new
Array
();
notificationSlotArray
[
0
]
=
notificationSlot
;
notificationSlotArray
[
0
]
=
notificationSlot
;
Notification
.
addSlots
(
notificationSlotArray
).
then
((
void
)
=>
{
Notification
.
addSlots
(
notificationSlotArray
).
then
(()
=>
{
console
.
info
(
"
==========================>addSlotCallback=======================>
"
);
console
.
info
(
"
==========================>addSlotCallback=======================>
"
);
});
});
```
```
...
@@ -573,7 +573,7 @@ Notification.removeSlot(slotType,removeSlotCallback)
...
@@ -573,7 +573,7 @@ Notification.removeSlot(slotType,removeSlotCallback)
```
js
```
js
var
slotType
=
Notification
.
SlotType
.
SOCIAL_COMMUNICATION
;
var
slotType
=
Notification
.
SlotType
.
SOCIAL_COMMUNICATION
;
Notification
.
removeSlot
(
slotType
).
then
((
void
)
=>
{
Notification
.
removeSlot
(
slotType
).
then
(()
=>
{
console
.
info
(
"
==========================>removeSlotCallback=======================>
"
);
console
.
info
(
"
==========================>removeSlotCallback=======================>
"
);
});
});
```
```
...
@@ -624,7 +624,7 @@ Notification.removeAllSlots(removeAllCallBack)
...
@@ -624,7 +624,7 @@ Notification.removeAllSlots(removeAllCallBack)
-
示例
-
示例
```
js
```
js
Notification
.
removeAllSlots
().
then
((
void
)
=>
{
Notification
.
removeAllSlots
().
then
(()
=>
{
console
.
info
(
"
==========================>removeAllCallBack=======================>
"
);
console
.
info
(
"
==========================>removeAllCallBack=======================>
"
);
});
});
```
```
...
@@ -730,7 +730,7 @@ function onConsumeCallback(err, data) {
...
@@ -730,7 +730,7 @@ function onConsumeCallback(err, data) {
var
subscriber
=
{
var
subscriber
=
{
onConsume
:
onConsumeCallback
onConsume
:
onConsumeCallback
};
};
Notification
.
subscribe
(
subscriber
).
then
((
void
)
=>
{
Notification
.
subscribe
(
subscriber
).
then
(()
=>
{
console
.
info
(
"
==========================>subscribeCallback=======================>
"
);
console
.
info
(
"
==========================>subscribeCallback=======================>
"
);
});
});
```
```
...
@@ -796,7 +796,7 @@ function onConsumeCallback(err, data) {
...
@@ -796,7 +796,7 @@ function onConsumeCallback(err, data) {
var
subscriber
=
{
var
subscriber
=
{
onConsume
:
onConsumeCallback
onConsume
:
onConsumeCallback
};
};
Notification
.
unsubscribe
(
subscriber
).
then
((
void
)
=>
{
Notification
.
unsubscribe
(
subscriber
).
then
(()
=>
{
console
.
info
(
"
==========================>unsubscribeCallback=======================>
"
);
console
.
info
(
"
==========================>unsubscribeCallback=======================>
"
);
});
});
```
```
...
@@ -828,7 +828,7 @@ function enableNotificationCallback(err) {
...
@@ -828,7 +828,7 @@ function enableNotificationCallback(err) {
console
.
info
(
"
==========================>enableNotificationCallback=======================>
"
);
console
.
info
(
"
==========================>enableNotificationCallback=======================>
"
);
}
}
var
bundle
=
{
var
bundle
=
{
bundle
:
"
bundleName1
"
;
bundle
:
"
bundleName1
"
,
}
}
Notification
.
enableNotification
(
bundle
,
false
,
enableNotificationCallback
);
Notification
.
enableNotification
(
bundle
,
false
,
enableNotificationCallback
);
```
```
...
@@ -856,9 +856,9 @@ Notification.enableNotification(bundle, false, enableNotificationCallback);
...
@@ -856,9 +856,9 @@ Notification.enableNotification(bundle, false, enableNotificationCallback);
```
js
```
js
var
bundle
=
{
var
bundle
=
{
bundle
:
"
bundleName1
"
;
bundle
:
"
bundleName1
"
,
}
}
Notification
.
enableNotification
(
bundle
,
false
).
then
((
void
)
=>
{
Notification
.
enableNotification
(
bundle
,
false
).
then
(()
=>
{
console
.
info
(
"
==========================>enableNotificationCallback=======================>
"
);
console
.
info
(
"
==========================>enableNotificationCallback=======================>
"
);
});
});
```
```
...
@@ -889,7 +889,7 @@ function isNotificationEnabledCallback(err, data) {
...
@@ -889,7 +889,7 @@ function isNotificationEnabledCallback(err, data) {
console
.
info
(
"
==========================>isNotificationEnabledCallback=======================>
"
);
console
.
info
(
"
==========================>isNotificationEnabledCallback=======================>
"
);
}
}
var
bundle
=
{
var
bundle
=
{
bundle
:
"
bundleName1
"
;
bundle
:
"
bundleName1
"
,
}
}
Notification
.
isNotificationEnabled
(
bundle
,
isNotificationEnabledCallback
);
Notification
.
isNotificationEnabled
(
bundle
,
isNotificationEnabledCallback
);
```
```
...
@@ -916,7 +916,7 @@ Notification.isNotificationEnabled(bundle, isNotificationEnabledCallback);
...
@@ -916,7 +916,7 @@ Notification.isNotificationEnabled(bundle, isNotificationEnabledCallback);
```
js
```
js
var
bundle
=
{
var
bundle
=
{
bundle
:
"
bundleName1
"
;
bundle
:
"
bundleName1
"
,
}
}
Notification
.
isNotificationEnabled
(
bundle
).
then
((
data
)
=>
{
Notification
.
isNotificationEnabled
(
bundle
).
then
((
data
)
=>
{
console
.
info
(
"
==========================>isNotificationEnabledCallback=======================>
"
);
console
.
info
(
"
==========================>isNotificationEnabledCallback=======================>
"
);
...
@@ -1004,7 +1004,7 @@ function displayBadgeCallback(err) {
...
@@ -1004,7 +1004,7 @@ function displayBadgeCallback(err) {
console
.
info
(
"
==========================>displayBadgeCallback=======================>
"
);
console
.
info
(
"
==========================>displayBadgeCallback=======================>
"
);
}
}
var
bundle
=
{
var
bundle
=
{
bundle
:
"
bundleName1
"
;
bundle
:
"
bundleName1
"
,
}
}
Notification
.
displayBadge
(
bundle
,
false
,
displayBadgeCallback
);
Notification
.
displayBadge
(
bundle
,
false
,
displayBadgeCallback
);
```
```
...
@@ -1032,9 +1032,9 @@ Notification.displayBadge(bundle, false, displayBadgeCallback);
...
@@ -1032,9 +1032,9 @@ Notification.displayBadge(bundle, false, displayBadgeCallback);
```
js
```
js
var
bundle
=
{
var
bundle
=
{
bundle
:
"
bundleName1
"
;
bundle
:
"
bundleName1
"
,
}
}
Notification
.
displayBadge
(
bundle
,
false
).
then
((
void
)
=>
{
Notification
.
displayBadge
(
bundle
,
false
).
then
(()
=>
{
console
.
info
(
"
==========================>displayBadgeCallback=======================>
"
);
console
.
info
(
"
==========================>displayBadgeCallback=======================>
"
);
});
});
```
```
...
@@ -1065,7 +1065,7 @@ function isBadgeDisplayedCallback(err, data) {
...
@@ -1065,7 +1065,7 @@ function isBadgeDisplayedCallback(err, data) {
console
.
info
(
"
==========================>isBadgeDisplayedCallback=======================>
"
);
console
.
info
(
"
==========================>isBadgeDisplayedCallback=======================>
"
);
}
}
var
bundle
=
{
var
bundle
=
{
bundle
:
"
bundleName1
"
;
bundle
:
"
bundleName1
"
,
}
}
Notification
.
isBadgeDisplayed
(
bundle
,
isBadgeDisplayedCallback
);
Notification
.
isBadgeDisplayed
(
bundle
,
isBadgeDisplayedCallback
);
```
```
...
@@ -1092,7 +1092,7 @@ Notification.isBadgeDisplayed(bundle, isBadgeDisplayedCallback);
...
@@ -1092,7 +1092,7 @@ Notification.isBadgeDisplayed(bundle, isBadgeDisplayedCallback);
```
js
```
js
var
bundle
=
{
var
bundle
=
{
bundle
:
"
bundleName1
"
;
bundle
:
"
bundleName1
"
,
}
}
Notification
.
isBadgeDisplayed
(
bundle
).
then
((
data
)
=>
{
Notification
.
isBadgeDisplayed
(
bundle
).
then
((
data
)
=>
{
console
.
info
(
"
==========================>isBadgeDisplayedCallback=======================>
"
);
console
.
info
(
"
==========================>isBadgeDisplayedCallback=======================>
"
);
...
@@ -1126,7 +1126,7 @@ function setSlotByBundleCallback(err) {
...
@@ -1126,7 +1126,7 @@ function setSlotByBundleCallback(err) {
console
.
info
(
"
==========================>setSlotByBundleCallback=======================>
"
);
console
.
info
(
"
==========================>setSlotByBundleCallback=======================>
"
);
}
}
var
bundle
=
{
var
bundle
=
{
bundle
:
"
bundleName1
"
;
bundle
:
"
bundleName1
"
,
}
}
var
notificationSlot
=
{
var
notificationSlot
=
{
type
:
Notification
.
SlotType
.
SOCIAL_COMMUNICATION
type
:
Notification
.
SlotType
.
SOCIAL_COMMUNICATION
...
@@ -1157,12 +1157,12 @@ Notification.setSlotByBundle(bundle, notificationSlot, setSlotByBundleCallback);
...
@@ -1157,12 +1157,12 @@ Notification.setSlotByBundle(bundle, notificationSlot, setSlotByBundleCallback);
```
js
```
js
var
bundle
=
{
var
bundle
=
{
bundle
:
"
bundleName1
"
;
bundle
:
"
bundleName1
"
,
}
}
var
notificationSlot
=
{
var
notificationSlot
=
{
type
:
Notification
.
SlotType
.
SOCIAL_COMMUNICATION
type
:
Notification
.
SlotType
.
SOCIAL_COMMUNICATION
}
}
Notification
.
displayBadge
(
bundle
,
notificationSlot
).
then
((
void
)
=>
{
Notification
.
displayBadge
(
bundle
,
notificationSlot
).
then
(()
=>
{
console
.
info
(
"
==========================>setSlotByBundleCallback=======================>
"
);
console
.
info
(
"
==========================>setSlotByBundleCallback=======================>
"
);
});
});
```
```
...
@@ -1193,7 +1193,7 @@ function getSlotsByBundleCallback(err, data) {
...
@@ -1193,7 +1193,7 @@ function getSlotsByBundleCallback(err, data) {
console
.
info
(
"
==========================>getSlotsByBundleCallback=======================>
"
);
console
.
info
(
"
==========================>getSlotsByBundleCallback=======================>
"
);
}
}
var
bundle
=
{
var
bundle
=
{
bundle
:
"
bundleName1
"
;
bundle
:
"
bundleName1
"
,
}
}
Notification
.
getSlotsByBundle
(
bundle
,
getSlotsByBundleCallback
);
Notification
.
getSlotsByBundle
(
bundle
,
getSlotsByBundleCallback
);
```
```
...
@@ -1220,7 +1220,7 @@ Notification.getSlotsByBundle(bundle, getSlotsByBundleCallback);
...
@@ -1220,7 +1220,7 @@ Notification.getSlotsByBundle(bundle, getSlotsByBundleCallback);
```
js
```
js
var
bundle
=
{
var
bundle
=
{
bundle
:
"
bundleName1
"
;
bundle
:
"
bundleName1
"
,
}
}
Notification
.
getSlotsByBundle
(
bundle
).
then
((
data
)
=>
{
Notification
.
getSlotsByBundle
(
bundle
).
then
((
data
)
=>
{
console
.
info
(
"
==========================>getSlotsByBundleCallback=======================>
"
);
console
.
info
(
"
==========================>getSlotsByBundleCallback=======================>
"
);
...
@@ -1253,7 +1253,7 @@ function getSlotNumByBundle(err, data) {
...
@@ -1253,7 +1253,7 @@ function getSlotNumByBundle(err, data) {
console
.
info
(
"
==========================>getSlotNumByBundleCallback=======================>
"
);
console
.
info
(
"
==========================>getSlotNumByBundleCallback=======================>
"
);
}
}
var
bundle
=
{
var
bundle
=
{
bundle
:
"
bundleName1
"
;
bundle
:
"
bundleName1
"
,
}
}
Notification
.
getSlotNumByBundle
(
bundle
,
getSlotNumByBundleCallback
);
Notification
.
getSlotNumByBundle
(
bundle
,
getSlotNumByBundleCallback
);
```
```
...
@@ -1280,7 +1280,7 @@ Notification.getSlotNumByBundle(bundle, getSlotNumByBundleCallback);
...
@@ -1280,7 +1280,7 @@ Notification.getSlotNumByBundle(bundle, getSlotNumByBundleCallback);
```
js
```
js
var
bundle
=
{
var
bundle
=
{
bundle
:
"
bundleName1
"
;
bundle
:
"
bundleName1
"
,
}
}
Notification
.
getSlotNumByBundle
(
bundle
).
then
((
data
)
=>
{
Notification
.
getSlotNumByBundle
(
bundle
).
then
((
data
)
=>
{
console
.
info
(
"
==========================>getSlotNumByBundleCallback=======================>
"
);
console
.
info
(
"
==========================>getSlotNumByBundleCallback=======================>
"
);
...
@@ -1314,11 +1314,11 @@ function removeCallback(err) {
...
@@ -1314,11 +1314,11 @@ function removeCallback(err) {
console
.
info
(
"
==========================>removeCallback=======================>
"
);
console
.
info
(
"
==========================>removeCallback=======================>
"
);
}
}
var
bundle
=
{
var
bundle
=
{
bundle
:
"
bundleName1
"
;
bundle
:
"
bundleName1
"
,
}
}
var
notificationKey
=
{
var
notificationKey
=
{
id
:
0
;
id
:
0
,
label
:
"
label
"
;
label
:
"
label
"
,
}
}
Notification
.
remove
(
bundle
,
notificationKey
,
removeCallback
);
Notification
.
remove
(
bundle
,
notificationKey
,
removeCallback
);
```
```
...
@@ -1346,13 +1346,13 @@ Notification.remove(bundle, notificationKey, removeCallback);
...
@@ -1346,13 +1346,13 @@ Notification.remove(bundle, notificationKey, removeCallback);
```
js
```
js
var
bundle
=
{
var
bundle
=
{
bundle
:
"
bundleName1
"
;
bundle
:
"
bundleName1
"
,
}
}
var
notificationKey
=
{
var
notificationKey
=
{
id
:
0
;
id
:
0
,
label
:
"
label
"
;
label
:
"
label
"
,
}
}
Notification
.
remove
(
bundle
,
notificationKey
).
then
((
void
)
=>
{
Notification
.
remove
(
bundle
,
notificationKey
).
then
(()
=>
{
console
.
info
(
"
==========================>removeCallback=======================>
"
);
console
.
info
(
"
==========================>removeCallback=======================>
"
);
});
});
```
```
...
@@ -1407,7 +1407,7 @@ Notification.remove(hashCode, removeCallback);
...
@@ -1407,7 +1407,7 @@ Notification.remove(hashCode, removeCallback);
-
示例
-
示例
```
js
```
js
Notification
.
remove
(
hashCode
).
then
((
void
)
=>
{
Notification
.
remove
(
hashCode
).
then
(()
=>
{
console
.
info
(
"
==========================>removeCallback=======================>
"
);
console
.
info
(
"
==========================>removeCallback=======================>
"
);
});
});
```
```
...
@@ -1438,7 +1438,7 @@ function removeAllCallback(err) {
...
@@ -1438,7 +1438,7 @@ function removeAllCallback(err) {
console
.
info
(
"
==========================>removeAllCallback=======================>
"
);
console
.
info
(
"
==========================>removeAllCallback=======================>
"
);
}
}
var
bundle
=
{
var
bundle
=
{
bundle
:
"
bundleName1
"
;
bundle
:
"
bundleName1
"
,
}
}
Notification
.
removeAll
(
bundle
,
removeAllCallback
);
Notification
.
removeAll
(
bundle
,
removeAllCallback
);
```
```
...
@@ -1492,7 +1492,7 @@ Notification.removeAll(removeAllCallback);
...
@@ -1492,7 +1492,7 @@ Notification.removeAll(removeAllCallback);
-
示例
-
示例
```
js
```
js
Notification
.
removeAll
().
then
((
void
)
=>
{
Notification
.
removeAll
().
then
(()
=>
{
console
.
info
(
"
==========================>removeAllCallback=======================>
"
);
console
.
info
(
"
==========================>removeAllCallback=======================>
"
);
});
});
```
```
...
@@ -1800,7 +1800,7 @@ function setDoNotDisturbDateCallback(err) {
...
@@ -1800,7 +1800,7 @@ function setDoNotDisturbDateCallback(err) {
}
}
var
doNotDisturbDate
=
{
var
doNotDisturbDate
=
{
type
:
n
otification
.
DoNotDisturbType
.
TYPE_ONCE
,
type
:
N
otification
.
DoNotDisturbType
.
TYPE_ONCE
,
begin
:
new
Date
(),
begin
:
new
Date
(),
end
:
new
Date
(
2021
,
11
,
15
,
18
,
0
)
end
:
new
Date
(
2021
,
11
,
15
,
18
,
0
)
}
}
...
@@ -1830,7 +1830,7 @@ Notification.setDoNotDisturbDate(doNotDisturbDate, setDoNotDisturbDateCallback);
...
@@ -1830,7 +1830,7 @@ Notification.setDoNotDisturbDate(doNotDisturbDate, setDoNotDisturbDateCallback);
```
js
```
js
var
doNotDisturbDate
=
{
var
doNotDisturbDate
=
{
type
:
n
otification
.
DoNotDisturbType
.
TYPE_ONCE
,
type
:
N
otification
.
DoNotDisturbType
.
TYPE_ONCE
,
begin
:
new
Date
(),
begin
:
new
Date
(),
end
:
new
Date
(
2021
,
11
,
15
,
18
,
0
)
end
:
new
Date
(
2021
,
11
,
15
,
18
,
0
)
}
}
...
@@ -2120,7 +2120,7 @@ Notification.isNotificationEnabledSelf()
...
@@ -2120,7 +2120,7 @@ Notification.isNotificationEnabledSelf()
| onConnect?:() | 读、写 | function | 否 | 注册订阅回调函数 |
| onConnect?:() | 读、写 | function | 否 | 注册订阅回调函数 |
| onDisconnect?:() | 读、写 | function | 否 | 取消订阅回调函数 |
| onDisconnect?:() | 读、写 | function | 否 | 取消订阅回调函数 |
| onDestroy?:() | 读、写 | function | 否 | 服务失联回调函数 |
| onDestroy?:() | 读、写 | function | 否 | 服务失联回调函数 |
| onDoNotDisturbDateChange?:(mode:
n
otification.
[
DoNotDisturbDate
](
#donotdisturbdate
)
) | 读、写 | function | 否 | 免打扰时间选项变更回调函数 |
| onDoNotDisturbDateChange?:(mode:
N
otification.
[
DoNotDisturbDate
](
#donotdisturbdate
)
) | 读、写 | function | 否 | 免打扰时间选项变更回调函数 |
### onEnabledNotificationChanged
### onEnabledNotificationChanged
...
@@ -2895,7 +2895,7 @@ var wantAgentInfo = {
...
@@ -2895,7 +2895,7 @@ var wantAgentInfo = {
],
],
operationType
:
OperationType
.
START_ABILITIES
,
operationType
:
OperationType
.
START_ABILITIES
,
requestCode
:
0
,
requestCode
:
0
,
wantAgentFlags
:[
WantAgent
WantAgent
Flags
.
UPDATE_PRESENT_FLAG
]
wantAgentFlags
:[
WantAgentFlags
.
UPDATE_PRESENT_FLAG
]
}
}
WantAgent
.
getWantAgent
(
wantAgentInfo
,
getWantAgentCallback
)
WantAgent
.
getWantAgent
(
wantAgentInfo
,
getWantAgentCallback
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录