CNNotificationMessage.java
5.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
package io.rong.imlib.model;
import android.net.Uri;
import android.os.Parcel;
import android.os.Parcelable;
import io.rong.push.RongPushClient;
import io.rong.push.common.ParcelUtils;
import io.rong.push.notification.PushNotificationMessage;
/**
* Created by Lynn on 2/17/2017.
*/
public class CNNotificationMessage implements Parcelable {
private String pushId;
private RongPushClient.ConversationType conversationType;
private long receivedTime;
private String objectName;
private String senderId;
private String senderName;
private Uri senderPortrait;
private String targetId;
private String targetUserName;
private String pushTitle;
private String pushContent;
private String pushData;
private String extra;
private String isFromPush;
public static final Creator<PushNotificationMessage> CREATOR = new Creator() {
public CNNotificationMessage createFromParcel(Parcel source) {
return new CNNotificationMessage(source);
}
public CNNotificationMessage[] newArray(int size) {
return new CNNotificationMessage[size];
}
};
public CNNotificationMessage() {
}
public void setPushId(String id) {
this.pushId = id;
}
public void setConversationType(RongPushClient.ConversationType type) {
this.conversationType = type;
}
public void setReceivedTime(long time) {
this.receivedTime = time;
}
public void setObjectName(String objectName) {
this.objectName = objectName;
}
public void setSenderId(String id) {
this.senderId = id;
}
public void setSenderName(String name) {
this.senderName = name;
}
public void setSenderPortrait(Uri uri) {
this.senderPortrait = uri;
}
public void setTargetId(String id) {
this.targetId = id;
}
public void setTargetUserName(String name) {
this.targetUserName = name;
}
public void setPushTitle(String title) {
this.pushTitle = title;
}
public void setPushContent(String content) {
this.pushContent = content;
}
public void setPushData(String appDataContent) {
this.pushData = appDataContent;
}
public void setExtra(String extra) {
this.extra = extra;
}
public void setPushFlag(String value) {
this.isFromPush = value;
}
public String getPushId() {
return this.pushId;
}
public RongPushClient.ConversationType getConversationType() {
return this.conversationType;
}
public String getTargetId() {
return this.targetId;
}
public String getTargetUserName() {
return this.targetUserName;
}
public long getReceivedTime() {
return this.receivedTime;
}
public String getObjectName() {
return this.objectName;
}
public String getSenderId() {
return this.senderId;
}
public String getSenderName() {
return this.senderName;
}
public Uri getSenderPortrait() {
return this.senderPortrait;
}
public String getPushTitle() {
return this.pushTitle;
}
public String getPushContent() {
return this.pushContent;
}
public String getPushData() {
return this.pushData;
}
public String getExtra() {
return this.extra;
}
public String getPushFlag() {
return this.isFromPush;
}
public void writeToParcel(Parcel dest, int flags) {
ParcelUtils.writeToParcel(dest, this.getPushId());
ParcelUtils.writeToParcel(dest, Integer.valueOf(this.getConversationType().getValue()));
ParcelUtils.writeToParcel(dest, Long.valueOf(this.getReceivedTime()));
ParcelUtils.writeToParcel(dest, this.getObjectName());
ParcelUtils.writeToParcel(dest, this.getSenderId());
ParcelUtils.writeToParcel(dest, this.getSenderName());
ParcelUtils.writeToParcel(dest, this.getSenderPortrait());
ParcelUtils.writeToParcel(dest, this.getTargetId());
ParcelUtils.writeToParcel(dest, this.getTargetUserName());
ParcelUtils.writeToParcel(dest, this.getPushTitle());
ParcelUtils.writeToParcel(dest, this.getPushContent());
ParcelUtils.writeToParcel(dest, this.getPushData());
ParcelUtils.writeToParcel(dest, this.getExtra());
ParcelUtils.writeToParcel(dest, this.getPushFlag());
}
public CNNotificationMessage(Parcel in) {
this.setPushId(ParcelUtils.readFromParcel(in));
this.setConversationType(RongPushClient.ConversationType.setValue(ParcelUtils.readIntFromParcel(in).intValue()));
this.setReceivedTime(ParcelUtils.readLongFromParcel(in).longValue());
this.setObjectName(ParcelUtils.readFromParcel(in));
this.setSenderId(ParcelUtils.readFromParcel(in));
this.setSenderName(ParcelUtils.readFromParcel(in));
this.setSenderPortrait((Uri) ParcelUtils.readFromParcel(in, Uri.class));
this.setTargetId(ParcelUtils.readFromParcel(in));
this.setTargetUserName(ParcelUtils.readFromParcel(in));
this.setPushTitle(ParcelUtils.readFromParcel(in));
this.setPushContent(ParcelUtils.readFromParcel(in));
this.setPushData(ParcelUtils.readFromParcel(in));
this.setExtra(ParcelUtils.readFromParcel(in));
this.setPushFlag(ParcelUtils.readFromParcel(in));
}
public int describeContents() {
return 0;
}
}