THis is the result i get after i login to the server. the main things i want to do is, after it login and will open another page which will list out all the data to another activity named MainActivity.
public void showJSON(String json){
ParseJson pj = new ParseJson(json);
pj.parseJson();
EventList cl = new EventList(this, ParseJson.ids,ParseJson.titles,ParseJson.descriptions);
listViewMain.setAdapter(cl);
}
I try to put this code inside my MainActivity, and called it from LoginActivity:
public void onResponse(String response) {
if(response.trim().equals("Login failed. Please enter the correct information.")){
Toast.makeText(Login.this, response, Toast.LENGTH_LONG).show();
}else{
MainActivity test = new MainActivity();
test.showJSON(response);
}
}
But it got the error which is no responding. The main purpose is i want to get the data and put into my MainActivity listview. What method should i try after login and get the data in my another activity.