提交 c0602eb2 编写于 作者: taohebin@dcloud.io's avatar taohebin@dcloud.io

update: push.md

上级 00c7544b
......@@ -113,7 +113,7 @@ uni.offPushMessage(callback);
|名称|类型|必备|默认值|描述|
|:-|:-|:-|:-|:-|
|soundName|string|否|null|声音文件名|
|soundName|string|否|null|声音文件名(不能带文件后缀),需要放置声音文件到Android原生的`/res/raw/`目录下 [原生资源配置](https://uniapp.dcloud.net.cn/tutorial/app-nativeresource-android.html#nativeresources) |
|channelId|string|是|-|通知渠道id|
|channelDesc|string|是|-|通知渠道描述|
|enableLights|boolean|否|false|呼吸灯闪烁|
......@@ -121,6 +121,19 @@ uni.offPushMessage(callback);
|importance|number|否|3|通知的重要性级别,可选范围IMPORTANCE_LOW:2、IMPORTANCE_DEFAULT:3、IMPORTANCE_HIGH:4|
|lockscreenVisibility|number|否|-1000|锁屏可见性,可选范围VISIBILITY_PRIVATE:0、VISIBILITY_PUBLIC:1、VISIBILITY_SECRET:-1、VISIBILITY_NO_OVERRIDE:-1000|
##### 代码示例
```typescript
const manager = uni.getChannelManager()
manager.setPushChannel({
channelId: "xxx",
channelDesc: "通知渠道描述",
soundName: "pushsound" // 已经把声音文件存储到/res/raw/pushsound.mp3
})
```
##### setPushChannel兼容性
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册