コード例 #1
0
  /**
   * 获取所有的开奖信息
   *
   * @return
   */
  public JSONObject getLotteryAllNotice() {
    String result = "";
    try {
      JSONObject jsonProtocol = ProtocolManager.getInstance().getDefaultJsonProtocol();
      jsonProtocol.put(ProtocolManager.COMMAND, COMMAND);
      result =
          InternetUtils.GetMethodOpenHttpConnectSecurity(
              Constants.LOT_SERVER, jsonProtocol.toString());
      Log.e("noticeresult", result);
      return new JSONObject(result);
    } catch (JSONException e) {
      e.printStackTrace();
      // 联网失败了
    }

    return null;
  }
コード例 #2
0
  /** 检测是否更新新版本 statInfo 统计信息 */
  public String softwareupdate(JSONObject statInfo) {
    String reValue = "";
    try {
      JSONObject jsonProtocol = ProtocolManager.getInstance().getDefaultJsonProtocol();
      jsonProtocol.put(ProtocolManager.COMMAND, COMMAND);
      if (statInfo != null) {
        // 有统计信息
        jsonProtocol.put(ProtocolManager.GAME_STATINFO, statInfo);
      }
      reValue =
          InternetUtils.GetMethodOpenHttpConnectSecurity(
              Constants.LOT_SERVER, jsonProtocol.toString());
    } catch (Exception e) {
      Log.e(TAG, "softwareupeate error");
    }

    return reValue;
  }