String userId = jObj.getString("user_id"); String userType = jObj.getString("type"); String userActive = jObj.getString("active"); if (userId != "null") { switch (userType) { case "1": Toast.makeText(getApplicationContext(),"Access Denied", Toast.LENGTH_LONG).show(); break; default: session.setLogin(true); session.setType(userType,userId); if(userActive=="1"){ Intent dashB = new Intent(login_activity.this,MainDashBoard.class); startActivity(dashB); finish(); } else{ Toast.makeText(getApplicationContext(),"Not active", Toast.LENGTH_LONG).show(); } break; } } else { String errorMsg = jObj.getString("error_msg"); Toast.makeText(login_activity.this,"Invalid Username or Password", Toast.LENGTH_LONG).show();
==
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)