Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public PushMessage(String jsonMessage) throws PreyException{
- try {
- JSONObject jsonObj = new JSONObject(jsonMessage);
- JSONObject data = jsonObj.getJSONObject("data");
- this.event = jsonObj.getString("event");
- this.type = data.getString("type");
- this.body = data.getString("body");
- } catch (JSONException e) {
- throw new PreyException("Couldn't parse pushed json message");
- }
- }
Add Comment
Please, Sign In to add comment