I want to pass my API response to another activity . I am using intent but getting null in the next activity . My code is MainPage.java
public void onResponse(String response) {
System.out.println("output -- "+response);
members = response;
Intent intn = new Intent(MainPage.this,Calculation.class);
intn.putExtra("MEMBERS",members);
}
I am getting the correct response .
Calculation.java
Intent intn = new Intent();
members = intn.getStringExtra("MEMBERS");
System.out.println("dmkmdk"+members);
//no_of_members = Integer.parseInt(members);
I also want to parse it in integer form .