com.pubnub.api.PnGcmMessage Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pubnub-android-debug Show documentation
Show all versions of pubnub-android-debug Show documentation
PubNub is a cross-platform client-to-client (1:1 and 1:many) push service in the cloud, capable of broadcasting real-time messages to millions of web and mobile clients simultaneously, in less than a quarter second!
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) {
}
}
}