NIMSDK-AOS  9.16.0
NotificationAttachment.java
浏览该文件的文档.
1 package com.netease.nimlib.sdk.msg.attachment;
2 
4 
5 import org.json.JSONObject;
6 
10 public abstract class NotificationAttachment implements MsgAttachment {
11 
12  private NotificationType type;
13 
18  return type;
19  }
20 
25  public void setType(NotificationType type) {
26  this.type = type;
27  }
28 
29  @Override
30  public String toJson(boolean send) {
31  return null;
32  }
33 
34  final public void fromJson(String json) {
35 
36  }
37 
38  public abstract void parse(JSONObject json);
39 }
String toJson(boolean send)
将消息附件序列化为字符串,存储到消息数据库或发送到服务器。
void setType(NotificationType type)
设置通知类型