# notification
该接口用于发起本地通知。(linkx暂不支持)
# 输入
继承标准对象输入,扩展属性描述
| 名称 | 数据类型 | 必填 | 默认值 | 描述 |
|---|---|---|---|---|
| title | String | 是 | 标题 | |
| body | String | 是 | 主要内容 | |
| isAutoDisapper | bool | 是 | 是否自动移除 | |
| disapperTime | long | 是 | X时间后移除 | |
| clickAction | String | 是 | 点击本地通知回到activity后执行的JS方法 | |
| clickActionParams | JsonArray | 是 | 方法的参数 |
# 输出
继承标准对象输出,无扩展属性
# 示例代码
$("#btnNotification").tap(function() {
var params = {
"title":"理想",
"body":"这是理想!",
"isAutoDisappear":true,
"disappearTime":5000,
"clickAction": "afterNotification",
"clickActionParams": {"title":"理想"}
};
app.notification.notify(params);
});
afterNotification = function(param){
alert(param.title);
}