Toast
Notification主要用于手机通知栏中显示通知。

show

显示通知,返回id(integer)。
参数:
参数名 类型 默认值 说明
title string 必填 标题
content string 必填 内容
options object 选填 默认值:{showOnLockScreen: false, enableVibration: false},showOnLockScreen表示是否显示在锁屏上,enableVibration表示是否震动
例子:
function main() {
    var id = Notification.show('标题', '内容')
    console.log('id:', id)
}

cancel

取消通知
参数:
参数名 类型 默认值 说明
id integer 必填 通知id,调用show函数的返回值即为id
例子:
function main() {
    Notification.cancel(1000)
}