All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pubnub.api.PnGcmMessage Maven / Gradle / Ivy

Go to download

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!

There is a newer version: 3.7.10
Show newest version
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) {

        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy