Package io.rong.message
Class CommandNotificationMessage
-
- All Implemented Interfaces:
public class CommandNotificationMessage命令提醒消息类
命令消息类,此消息会进行存储,但不计入未读消息数。 与 CommandMessage 的区别是,此消息会进行存储并在界面上显示。
-
-
Constructor Summary
Constructors Constructor Description CommandNotificationMessage(Array<byte> data)CommandNotificationMessage(Parcel in)
-
Method Summary
Modifier and Type Method Description StringgetName()获取命令名。 voidsetName(String name)设置命令名。 StringgetData()获取命令数据,可以为任意格式,如 JSON。 voidsetData(String data)设置命令数据,可以为任意格式,如 JSON。 static CommandNotificationMessageobtain(String name, String data)创建消息实例。 Array<byte>encode()voidwriteToParcel(Parcel dest, int flags)将类的数据写入外部提供的 Parcel 中。 intdescribeContents()描述了包含在 Parcelable 对象排列信息中的特殊对象的类型。 -
-
Constructor Detail
-
CommandNotificationMessage
CommandNotificationMessage(Array<byte> data)
-
CommandNotificationMessage
CommandNotificationMessage(Parcel in)
-
-
Method Detail
-
getName
String getName()
获取命令名。
- Returns:
命令名。
-
setName
void setName(String name)
设置命令名。
- Parameters:
name- 命令名。
-
getData
String getData()
获取命令数据,可以为任意格式,如 JSON。
- Returns:
命令数据,可以为任意格式,如 JSON。
-
setData
void setData(String data)
设置命令数据,可以为任意格式,如 JSON。
- Parameters:
data- 命令数据,可以为任意格式,如 JSON。
-
obtain
static CommandNotificationMessage obtain(String name, String data)
创建消息实例。
- Parameters:
name- 获取命令名。data- 设置命令数据,可以为任意格式,如 JSON。- Returns:
消息实例。
-
writeToParcel
void writeToParcel(Parcel dest, int flags)
将类的数据写入外部提供的 Parcel 中。
- Parameters:
dest- 对象被写入的 Parcel。flags- 对象如何被写入的附加标志,可能是 0 或 PARCELABLE_WRITE_RETURN_VALUE。
-
describeContents
int describeContents()
描述了包含在 Parcelable 对象排列信息中的特殊对象的类型。
- Returns:
一个标志位,表明 Parcelable 对象特殊对象类型集合的排列。
-
-
-
-