Ejemplo n.º 1
0
  public JSONObject clientGetSysInfo(int passtype) {
    Map<String, String> parameters = new HashMap<String, String>();
    parameters.put(Constants.API_KEY, super.getClient().getKey());
    parameters.put(Constants.API_SECRET, super.getClient().getSecret());
    parameters.put(Constants.PASSTYPE, String.valueOf(passtype));

    String tokenResult =
        HttpURLUtils.doPost(
            super.getClient().getServerString() + Constants.URL_SYSTEM_GETINFO, parameters);
    JSONObject tokenJson = (JSONObject) JSONObject.parseObject(tokenResult);
    Log.i("reqUrl", super.getClient().getServerString() + Constants.URL_SYSTEM_GETINFO);
    return tokenJson;
  }
Ejemplo n.º 2
0
  public JSONObject personFindAll(int limit) {
    Map<String, String> parameters = new HashMap<String, String>();
    parameters.put(Constants.API_KEY, super.getClient().getKey());
    parameters.put(Constants.API_SECRET, super.getClient().getSecret());
    parameters.put(Constants.PERSON_LIMIT, limit + "");

    String tokenResult =
        HttpURLUtils.doPost(
            super.getClient().getServerString() + Constants.URL_PERSON_FIND_ALL, parameters);
    JSONObject tokenJson = (JSONObject) JSONObject.parseObject(tokenResult);

    return tokenJson;
  }
Ejemplo n.º 3
0
  public JSONObject clientRegisterVoiceprint(String id, String name, boolean bUpdate) {
    Map<String, String> parameters = new HashMap<String, String>();
    parameters.put(Constants.API_KEY, super.getClient().getKey());
    parameters.put(Constants.API_SECRET, super.getClient().getSecret());
    parameters.put(Constants.ID, id);
    parameters.put(Constants.NAME, name);
    parameters.put(Constants.UPDATE, String.valueOf(bUpdate));

    String tokenResult =
        HttpURLUtils.doPost(
            super.getClient().getServerString() + Constants.URL_MODEL_REGISTER, parameters);
    JSONObject tokenJson = (JSONObject) JSONObject.parseObject(tokenResult);

    return tokenJson;
  }