NIMSDK-AOS  9.16.3
MsgTypeEnum.java
浏览该文件的文档.
1 package com.netease.nimlib.sdk.msg.constant;
2 
3 import com.netease.nimlib.biz.constant.ITalkService;
4 
8 public enum MsgTypeEnum {
9 
13  undef(-1, "Unknown"),
14 
18  text(ITalkService.MsgType.text, ""),
19 
23  image(ITalkService.MsgType.image, "图片"),
24 
28  audio(ITalkService.MsgType.audio, "语音"),
29 
33  video(ITalkService.MsgType.video, "视频"),
34 
38  location(ITalkService.MsgType.location, "位置"),
39 
43  file(ITalkService.MsgType.file, "文件"),
44 
48  avchat(ITalkService.MsgType.avchat, "音视频通话"),
49 
53  notification(ITalkService.MsgType.notification, "通知消息"),
54 
58  tip(ITalkService.MsgType.tip, "提醒消息"),
59 
63  robot(ITalkService.MsgType.robot, "机器人消息"),
64 
68  nrtc_netcall(ITalkService.MsgType.nrtc_netcall, "通话记录"),
69 
73  custom(ITalkService.MsgType.custom, "自定义消息"),
74 
78  appCustom(ITalkService.MsgType.appCustom, "七鱼接入方自定义消息"),
79 
83  qiyuCustom(ITalkService.MsgType.qiyuCustom, "七鱼custom消息"),
87  qchatCustom(ITalkService.MsgType.qchatCustom, "圈组自定义消息"),
88 
89  ;
90 
91  final private int value;
92  final String sendMessageTip;
93 
94  MsgTypeEnum(int value, String sendMessageTip) {
95  this.value = value;
96  this.sendMessageTip = sendMessageTip;
97  }
98 
99  public static MsgTypeEnum typeOfValue(int value) {
100  for (MsgTypeEnum e : values()) {
101  if (e.getValue() == value) {
102  return e;
103  }
104  }
105  return undef;
106  }
107 
108 
109  public final int getValue() {
110  return value;
111  }
112 
113  public final String getSendMessageTip() {
114  return sendMessageTip;
115  }
116 }
appCustom
七鱼接入方自定义的消息
qiyuCustom
七鱼类型的 custom 消息
static MsgTypeEnum typeOfValue(int value)
MsgTypeEnum(int value, String sendMessageTip)