NIMSDK-AOS  9.20.15
MsgTypeEnum.java
浏览该文件的文档.
1 package com.netease.nimlib.sdk.msg.constant;
2 
3 import com.netease.nimlib.biz.constant.ITalkService;
4 
5 /**
6  * 消息类型定义
7  */
8 public enum MsgTypeEnum {
9 
10  /**
11  * 未知消息类型
12  */
13  undef(-1, "Unknown"),
14 
15  /**
16  * 文本消息类型
17  */
18  text(ITalkService.MsgType.text, ""),
19 
20  /**
21  * 图片消息
22  */
23  image(ITalkService.MsgType.image, "图片"),
24 
25  /**
26  * 音频消息
27  */
28  audio(ITalkService.MsgType.audio, "语音"),
29 
30  /**
31  * 视频消息
32  */
33  video(ITalkService.MsgType.video, "视频"),
34 
35  /**
36  * 位置消息
37  */
38  location(ITalkService.MsgType.location, "位置"),
39 
40  /**
41  * 文件消息
42  */
43  file(ITalkService.MsgType.file, "文件"),
44 
45  /**
46  * 音视频通话
47  */
48  avchat(ITalkService.MsgType.avchat, "音视频通话"),
49 
50  /**
51  * 通知消息
52  */
53  notification(ITalkService.MsgType.notification, "通知消息"),
54 
55  /**
56  * 提醒类型消息
57  */
58  tip(ITalkService.MsgType.tip, "提醒消息"),
59 
60  /**
61  * 机器人消息
62  */
63  robot(ITalkService.MsgType.robot, "机器人消息"),
64 
65  /**
66  * G2话单消息
67  */
68  nrtc_netcall(ITalkService.MsgType.nrtc_netcall, "通话记录"),
69 
70  /**
71  * 第三方APP自定义消息
72  */
73  custom(ITalkService.MsgType.custom, "自定义消息"),
74 
75  /**
76  * 七鱼接入方自定义的消息
77  */
78  appCustom(ITalkService.MsgType.appCustom, "七鱼接入方自定义消息"),
79 
80  /**
81  * 七鱼类型的 custom 消息
82  */
83  qiyuCustom(ITalkService.MsgType.qiyuCustom, "七鱼custom消息"),
84  /**
85  * 圈组自定义消息
86  */
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)