예제 #1
0
 protected void addParams(ArrayList<BasicNameValuePair> params) {
   if (!StringUtils.isNullOrEmpty(teamId()))
     params.add(new BasicNameValuePair("teamId", teamId()));
   if (maxCount() != null)
     params.add(new BasicNameValuePair("maxCount", Integer.toString(maxCount())));
   if (refreshFirst() != null)
     params.add(new BasicNameValuePair("refreshFirst", Boolean.toString(refreshFirst())));
 }
예제 #2
0
  public JSONObject toJSONCreate() {
    JSONObject json = new JSONObject();

    try {
      if (!StringUtils.isNullOrEmpty(text())) {
        json.put("statusUpdate", text());
      }

      if (photo() != null) {
        json.put("photo", BitmapUtils.getEncodedStringFrom(photo()));
        json.put("isPortrait", photo().getWidth() > photo().getHeight());
      }
      if (rawVideo() != null) {
        json.put("video", rawVideo());
      }
    } catch (JSONException e) {
    }

    return json;
  }
예제 #3
0
 public boolean hasTeamId() {
   return !StringUtils.isNullOrEmpty(teamId());
 }