I have created two class one is LoginSignupActivity.java and another is ProfileActivity.java
LoginSignUpActivity.java---
public class LoginSi
do as:
public static String id="NA";
you will get NA if id is not received by your line of code:
id=response.getJSONObject().getString("id");
As you told in comment, you should use the value of id after getting it only
id=response.getJSONObject().getString("id");
I thing you should only start the ProfileActivity.java just after getting id valueas below:
id=response.getJSONObject().getString("id");
Intent intent=new Intent(LoginSignupActivity.this,ProfileActivity.class);
startActivity(intent);
Thanks