|
NIMSDK-AOS
10.9.60
|
Public 成员函数 | |
| void | sendCustomNotification (String conversationId, String content, V2NIMSendCustomNotificationParams params, V2NIMSuccessCallback< Void > success, V2NIMFailureCallback failure) |
| 发送自定义通知, 主要以下MsgType 发送该通知后, 接收端SDK会抛出onReceiveCustomNotification回调 CUSTOM_P2P_MSG(100), // p2p透传通知 CUSTOM_TEAM_MSG(101), // 群透传通知 YSF_CUSTOM_P2P_MSG(102), // 云商服的点对点自定义系统通知 CUSTOM_SUPERTEAM_MSG(103), // 超大群透传通知 更多... | |
| void | addNotificationListener (V2NIMNotificationListener listener) |
| 注册通知监听器 更多... | |
| void | removeNotificationListener (V2NIMNotificationListener listener) |
| 反注册通知状态监听器 更多... | |
在文件 V2NIMNotificationService.java 第 7 行定义.
| void com.netease.nimlib.sdk.v2.notification.V2NIMNotificationService.addNotificationListener | ( | V2NIMNotificationListener | listener | ) |
注册通知监听器
| listener | 监听回调 |
| void com.netease.nimlib.sdk.v2.notification.V2NIMNotificationService.removeNotificationListener | ( | V2NIMNotificationListener | listener | ) |
反注册通知状态监听器
| listener | 监听回调 |
| void com.netease.nimlib.sdk.v2.notification.V2NIMNotificationService.sendCustomNotification | ( | String | conversationId, |
| String | content, | ||
| V2NIMSendCustomNotificationParams | params, | ||
| V2NIMSuccessCallback< Void > | success, | ||
| V2NIMFailureCallback | failure | ||
| ) |
发送自定义通知, 主要以下MsgType 发送该通知后, 接收端SDK会抛出onReceiveCustomNotification回调 CUSTOM_P2P_MSG(100), // p2p透传通知 CUSTOM_TEAM_MSG(101), // 群透传通知 YSF_CUSTOM_P2P_MSG(102), // 云商服的点对点自定义系统通知 CUSTOM_SUPERTEAM_MSG(103), // 超大群透传通知
| conversationId | 会话 ID |
| content | 通知内容 SystemMsgTag.Attach字段 最大4096 |
| params | 通知内容 发送通知相关配置参数,可以配置如下参数,具体参见参数定义 通知相关参数配置 通知推送参数配置 通知反垃圾配置 抄送通知配置 |
| success | 发送消息成功回调 |
| failure | 发送消息失败回调 |
1.8.11