@Override
 void setState(ContentValues values) {
   super.setState(values);
   this.mNotificationActioned = parseBoolean(values, NOTIFICATION_ACTIONED);
   this.mNotificationFirstDisplayedDate = values.getAsLong(NOTIFICATION_FIRST_DISPLAYED_DATE);
   this.mNotificationLastDisplayedDate = values.getAsLong(NOTIFICATION_LAST_DISPLAYED_DATE);
   this.mContentDisplayed = parseBoolean(values, CONTENT_DISPLAYED);
 }
  @Override
  void setPayload(org.json.JSONObject payload) throws JSONException {
    /* Get parent fields */
    super.setPayload(payload);

    /* Get image data, we decode the bitmap in a lazy way */
    mNotificationImageString = payload.optString("notificationImage", null);

    /* Delivery activities */
    JSONArray deliveryActivities = payload.optJSONArray("deliveryActivities");
    if (deliveryActivities != null) {
      mAllowedActivities = new HashSet<String>();
      for (int i = 0; i < deliveryActivities.length(); i++)
        mAllowedActivities.add(deliveryActivities.getString(i));
    }

    /* Get body related fields */
    mTitle = payload.optString("title", null);
    mActionLabel = payload.optString("actionButtonText", null);
    mExitLabel = payload.optString("exitButtonText", null);
  }