I have a scenario where I have to pass userType that is the variable to the asyncTask. The variable contains either of the two:- teacher or student that is coming from the server. In the AsyncTask if the userType = TEACHER then a URL is fired and if userType = STUDENT the a new URL is fired.
new GetIncidentsTask(IncidentsActivity.this).execute(userType);
From here I am sending the usertype.
Now in the asyncTask I have to check But unfornately I cant
if (){
String json = jsonParser.makeHttpRequest(CC.GETINCIDENTS_TEACHER, "GET",
null);
String details = json.toString();
Log.d("List of Incidents", details);
}else {
String json = jsonParser.makeHttpRequest(CC.GETINCIDENTS_STUDENT, "GET",
null);
String details = json.toString();
Log.d("List of Incidents", details);
}
How to check? I am stuck into this for quite sometime.Please help.