forked from ringcentral/pubnub-jtools
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPnGcmMessage.java
More file actions
42 lines (36 loc) · 791 Bytes
/
Copy pathPnGcmMessage.java
File metadata and controls
42 lines (36 loc) · 791 Bytes
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
package com.pubnub.api;
import org.json.JSONException;
import org.json.JSONObject;
/**
* Message object for GCM
* @author Pubnub
*
*/
public class PnGcmMessage extends JSONObject {
/**
* Constructor for PnGcmMessage
*/
public PnGcmMessage() {
super();
}
/**
* Constructor for PnGcmMessage
* @param json
* json object to be set as data for GCM message
*/
public PnGcmMessage(JSONObject json) {
super();
setData(json);
}
/**
* Set Data for PnGcmMessage
* @param json
* json object to be set as data for GCM message
*/
public void setData(JSONObject json) {
try {
this.put("data", json);
} catch (JSONException e) {
}
}
}