帖子
帖子
用户
博客
课程
显示全部楼层
3
帖子
0
勋章
15
Y币

[插件使用] 融云2,设置消息接收状态,IOS可以设置静音,安卓设置无效

[复制链接]
发表于 2015-11-10 22:32:10
融云2,设置消息接收状态,IOS可以设置静音,安卓设置无效
以下是相关代码:
  1. //获取某个会话的通知状态
  2. function getConversationNotificationStatus($targetId,$messageType){
  3.         rong.getConversationNotificationStatus({
  4.                 conversationType: $messageType,
  5.                 targetId: ''+$targetId+''
  6.             }, function (ret, err) {
  7.                 if (ret.status == 'success'){
  8.                         api.sendEvent({
  9.                                 name : 'setNotificationText',
  10.                             extra : {
  11.                                 status : ret.result.notificationStatus,
  12.                                 code : ret.result.code
  13.                             }
  14.                         })
  15.                 }
  16.         })
  17. }
  18. //设置某个会话的通知状态
  19. function setConversationNotificationStatus($targetId,$status,$messageType){
  20.         rong.setConversationNotificationStatus({
  21.                     conversationType:''+$messageType+'',
  22.                     targetId: ''+$targetId+'',
  23.                     notificationStatus: ''+$status+''
  24.             }, function (ret, err) {
  25.                            //alert('1:'+JSON.stringify(ret));
  26.                            //alert('2:'+JSON.stringify(err));
  27.                 if (ret.status == 'success'){
  28.                     api.sendEvent({
  29.                                 name : 'setNotificationText',
  30.                             extra : {
  31.                                 status : ret.result.notificationStatus,
  32.                                 code : ret.result.code
  33.                             }
  34.                         })
  35.                 }
  36.         })
  37. }
复制代码


5
帖子
0
勋章
1万+
Y币
这些只是获取相关信息,设置静音是否有效跟你的手机有关吧
5
帖子
0
勋章
21
Y币
我也碰到同样的问题,rongCloud设置有效,在rongCloud2上就不行。
另外,在后台发送“通用命令通知消息”时,手机收到消息后也会有提示,但按照融云官方的说明这种消息应该是收到后不会提示的出来的
5
帖子
0
勋章
21
Y币
http://www**.**/docs/server.html#消息发送服务

希望APICOLUD能正视这些问题,已经多次试验过了
您需要登录后才可以回帖 登录

本版积分规则