Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.pubnub.api;
 
 import  org.json.JSONException;
 import  org.json.JSONObject;

Message object for GCM

Author(s):
Pubnub
public class PnGcmMessage extends JSONObject {

    
Constructor for PnGcmMessage
    public PnGcmMessage() {
        super();
    }

    
Constructor for PnGcmMessage

Parameters:
json json object to be set as data for GCM message
    public PnGcmMessage(JSONObject json) {
        super();
        setData(json);
    }

    
Set Data for PnGcmMessage

Parameters:
json json object to be set as data for GCM message
    public void setData(JSONObject json) {
        try {
            this.put("data"json);
        } catch (JSONException e) {
        }
    }
New to GrepCode? Check out our FAQ X