내 응답 1000, 2350 등 인 경우 HTTP POST를가HttpPost 및 HttpRequest를 복수 응답이
try {
String response1 = null;
response1 = CustomHttpClient.executeHttpPost(
"http://giveaway.synamegames.com/appfiles/login.php",
postParameters);
String res = response1.toString();
// res = res.trim();
res = res.replaceAll("\\s+", "");
if (res.equals("2350") && checkboxv.equals("1")) {
Intent login = new Intent(this, MainMenuActivity.class);
login.setFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
startActivity(login);
SavePreferences("lu", et_username.getText().toString());
SavePreferences("lp", et_pass.getText().toString());
SavePreferences("cbauto", "1");
} else if (res.equals("2350") && checkboxv.equals("0")) {
Intent login = new Intent(this, MainMenuActivity.class);
login.setFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
startActivity(login);
SavePreferences("lu", "");
SavePreferences("lp", "");
SavePreferences("cbauto", "0");
} else if (res.equals("1000")) {
Toast.makeText(this, "Incorrect version. Please update.",
Toast.LENGTH_SHORT).show();
} else if (res.equals("588")) {
Toast.makeText(this, "Incorrect Password or Username.",
Toast.LENGTH_SHORT).show();
} else {
Toast.makeText(this,
"Server Error. Please try again later.",
Toast.LENGTH_SHORT).show();
}
} catch (Exception e) {
}
는 안드로이드 전화를 특정 응답을주지 있습니다. 그러나 나는 내 데이터베이스가 안드로이드 데이터베이스 정보를 제공하기를 원한다. 내 상황에서는 플레이어가 등록하고 이름, 이메일, 사용자 이름 및 암호를 입력하십시오. 로그인시 사용자가 계정을 만들 때 지정한 이름을 전화로 가져 오려고합니다. 보안상의 이유로이 정보를 전화 상에 저장할 수 없습니다. 여러 HTTP 게시물을 가질 수 있지만 응용 프로그램이 느려질 수 있습니다. 내 질문은 ...
여러 개의 응답을 검색하고 다른 HTTP 게시물을 수행 할 필요없이 다른 문자열에 응답을 넣을 수있는 방법이 있습니까?
당신은 성공적으로 로그인 한 후에 당신이 등록하는 사용자의 이름을 얻기 위해 또 다른 http 호출을해야합니까? – momo
옙, 나는 또한 그들이 등록하는 동안 입력했을 다른 정보를 얻을 필요가있다 – Drake