NIMSDK-AOS  9.15.0
Public 成员函数 | Public 属性 | 所有成员列表
com.netease.nimlib.sdk.msg.model.RecentSession接口 参考
类 com.netease.nimlib.sdk.msg.model.RecentSession 继承关系图:

Public 成员函数

String getSessionId ()
 获取会话的ID(会话类型|好友帐号,群ID等),会话类型分为p2p/team/superTeam,格式分别是:p2p|accid、team|tid、super_team|tid 更多...
 
long getUpdateTime ()
 获取最近一条消息的时间戳 更多...
 
String getExt ()
 获取扩展字段 更多...
 
String getLastMsg ()
 获取最近的一条消息,可能为空 更多...
 
RevokeMsgNotification getRevokeNotification ()
 最后一条消息为撤回通知时,返回不是null 此时,可通过此接口获得一个RevokeMsgNotification实例,里面只有部分内容,或者为空 更多...
 
RecentContact toRecentContact ()
 新建带有RecentSession信息的RecentContact 更多...
 
Pair< SessionTypeEnum, String > parseSessionId ()
 从session中分离出会话id和会话类型 更多...
 
int getLastMsgType ()
 最近一条消息的类型,0或者缺失表示普通消息,1表示消息撤回通知 更多...
 

Public 属性

String KEY_EXT = "ext"
 

详细描述

在文件 RecentSession.java9 行定义.

成员函数说明

◆ getExt()

String com.netease.nimlib.sdk.msg.model.RecentSession.getExt ( )

获取扩展字段

返回
扩展字段

◆ getLastMsg()

String com.netease.nimlib.sdk.msg.model.RecentSession.getLastMsg ( )

获取最近的一条消息,可能为空

返回
最后一条消息的Json字符串, 可通过com.netease.nimlib.sdk.msg.MessageBuilder的createFromJson转换为IMMessage

◆ getLastMsgType()

int com.netease.nimlib.sdk.msg.model.RecentSession.getLastMsgType ( )

最近一条消息的类型,0或者缺失表示普通消息,1表示消息撤回通知

返回
0表示普通消息,1表示消息撤回通知

◆ getRevokeNotification()

RevokeMsgNotification com.netease.nimlib.sdk.msg.model.RecentSession.getRevokeNotification ( )

最后一条消息为撤回通知时,返回不是null 此时,可通过此接口获得一个RevokeMsgNotification实例,里面只有部分内容,或者为空

◆ getSessionId()

String com.netease.nimlib.sdk.msg.model.RecentSession.getSessionId ( )

获取会话的ID(会话类型|好友帐号,群ID等),会话类型分为p2p/team/superTeam,格式分别是:p2p|accid、team|tid、super_team|tid

返回
会话ID

◆ getUpdateTime()

long com.netease.nimlib.sdk.msg.model.RecentSession.getUpdateTime ( )

获取最近一条消息的时间戳

返回
时间

◆ parseSessionId()

Pair<SessionTypeEnum, String> com.netease.nimlib.sdk.msg.model.RecentSession.parseSessionId ( )

从session中分离出会话id和会话类型

返回
会话类型和会话id构成的Pair

◆ toRecentContact()

RecentContact com.netease.nimlib.sdk.msg.model.RecentSession.toRecentContact ( )

新建带有RecentSession信息的RecentContact

返回
转化好的RecentContact

类成员变量说明

◆ KEY_EXT

String com.netease.nimlib.sdk.msg.model.RecentSession.KEY_EXT = "ext"

在文件 RecentSession.java11 行定义.


该接口的文档由以下文件生成: