Class InformationNotificationMessage

  • All Implemented Interfaces:

    
    public class InformationNotificationMessage
    
                        

    通知消息类

    通知消息类,此消息会进行存储,但不计入未读消息数。

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      public String message
      public final static Creator<InformationNotificationMessage> CREATOR
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      String getMessage() 获取提示条(小灰条)通知消息的内容。
      void setMessage(String message) 设置提示条(小灰条)通知消息内容。
      static InformationNotificationMessage obtain(String message) 生成 InformationNotificationMessage 对象。
      Array<byte> encode() 将本地消息对象序列化为消息数据。
      void writeToParcel(Parcel dest, int flags) 将类的数据写入外部提供的 Parcel 中。
      int describeContents() 描述了包含在 Parcelable 对象排列信息中的特殊对象的类型。
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • InformationNotificationMessage

        InformationNotificationMessage(String message)
        构造函数。
        Parameters:
        message - 提示条(小灰条)通知消息的内容。
      • InformationNotificationMessage

        InformationNotificationMessage(Array<byte> data)
        构造函数。
        Parameters:
        data - 存放 json 串的 byte 数组。
      • InformationNotificationMessage

        InformationNotificationMessage(Parcel in)
        构造函数。
        Parameters:
        in - 初始化传入的 Parcel。
    • Method Detail

      • getMessage

         String getMessage()

        获取提示条(小灰条)通知消息的内容。

        Returns:

        提示条(小灰条)通知消息的内容。

      • setMessage

         void setMessage(String message)

        设置提示条(小灰条)通知消息内容。

        Parameters:
        message - 提示条(小灰条)通知消息的内容。
      • obtain

         static InformationNotificationMessage obtain(String message)

        生成 InformationNotificationMessage 对象。

        Parameters:
        message - 提示条(小灰条)通知消息内容
        Returns:

        消息实体

      • encode

         Array<byte> encode()

        将本地消息对象序列化为消息数据。

        Returns:

        消息数据。

      • writeToParcel

         void writeToParcel(Parcel dest, int flags)

        将类的数据写入外部提供的 Parcel 中。

        Parameters:
        dest - 对象被写入的 Parcel。
        flags - 对象如何被写入的附加标志,可能是 0 或 PARCELABLE_WRITE_RETURN_VALUE。
      • describeContents

         int describeContents()

        描述了包含在 Parcelable 对象排列信息中的特殊对象的类型。

        Returns:

        一个标志位,表明 Parcelable 对象特殊对象类型集合的排列。