SWDesk/App
[Android] JSON String from Web
inhae
2021. 10. 9. 10:53
if(HttpResponseString == null) return;
JSONObject jsonObject = null;
try {
jsonObject = new JSONObject(HttpResponseString);
if(jsonObject.has("Message")){
ShowResponseMessage(jsonObject.getString("Message"));
return;
}
}catch(Exception e){
Log.d("[??? HttpResponseString]", HttpResponseString);
}
switch(HttpRequestType){
case REQUEST_USERINFO:
HttpRequestType = REQUEST_NONE;
try{
LoginInfo = jsonObject;
JSONArray modelList = LoginInfo.getJSONArray("ModelData");
for(int index1=0; index1<modelList.length(); index1++){
JSONObject model0 = modelList.getJSONObject(0);
ModelList.add(model0);
ModelNameList.add(model0.getString("ModelName"));
}
JSONObject userInfo = LoginInfo.getJSONObject("UserInfo");
String eDate = userInfo.getString("E_Date");
if(!CheckExpireDate(eDate)){
openSimpleAlertDialogOnUiThread("[Notice]", "Subscription Expired");
//IsExpired = true;
return;
}
반응형