title: How to get data from getter setter class?
body: <p>I am beginner in android development , I have some issue please help me.
  I have 2 screen Login and After Login , I have set User id in login class and i want to use that user_id in after login how to get , when I use get method find Null how to resolve this problem.<br>
  here is my Login Code`public class LoginActivity extends FragmentActivity {</p>
  
  <pre><code>private EditText userName;
  private EditText password;
  private TextView forgotPassword;
  private TextView backToHome;
  private Button login;
  private CallbackManager callbackManager;
  private ReferanceWapper referanceWapper;
  private LoginBean loginBean;
  Context context;
  String regid;
  GoogleCloudMessaging gcm;
  String SENDER_ID = "918285686540";
  
  public static final String PROPERTY_REG_ID = "registration_id";
  private static final String PROPERTY_APP_VERSION = "appVersion";
  private final static int PLAY_SERVICES_RESOLUTION_REQUEST = 9000;
  static final String TAG = "GCM";
  
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
  
      super.onCreate(savedInstanceState);
      requestWindowFeature(Window.FEATURE_NO_TITLE);
      setContentView(R.layout.activity_login);
      Utility.setStatusBarColor(this, R.color.tranparentColor);
      getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
      Typeface tf = Typeface.createFromAsset(getAssets(), "fonts/OpenSans_Regular.ttf");
      setupUI(findViewById(R.id.parentEdit));
  
      userName = (EditText) findViewById(R.id.userName);
      userName.setTypeface(tf);
      userName.setFocusable(false);
      userName.setOnTouchListener(new View.OnTouchListener() {
          public boolean onTouch(View view, MotionEvent paramMotionEvent) {
              userName.setFocusableInTouchMode(true);
              Utility.hideSoftKeyboard(LoginActivity.this);
              return false;
          }
      });
  
  
      password = (EditText) findViewById(R.id.passwordEText);
      password.setTypeface(tf);
      password.setFocusable(false);
      password.setOnTouchListener(new View.OnTouchListener() {
          public boolean onTouch(View paramView, MotionEvent paramMotionEvent) {
              password.setFocusableInTouchMode(true);
              Utility.hideSoftKeyboard(LoginActivity.this);
              return false;
          }
      });
  
  
      forgotPassword = (TextView) findViewById(R.id.forgotPassword);
      forgotPassword.setTypeface(tf);
      forgotPassword.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              Intent intent = new Intent(getApplicationContext(),ForgotPasswordActivity.class);
              startActivity(intent);
          }
      });
  
      backToHome = (TextView) findViewById(R.id.fromLogToHome);
      backToHome.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              onBackPressed();
          }
      });
      login = (Button) findViewById(R.id.loginBtn);
  
      login.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
  
              doLoginTask();
              //  Intent intent = new Intent(getApplicationContext(), AfterLoginActivity.class);
              //  startActivity(intent);
  
          }
      });
  }
  
  
  private void doLoginTask() {
  
      String strEmail = userName.getText().toString();
      String strPassword = password.getText().toString();
      if (strEmail.length() == 0) {
          userName.setError("Email Not Valid");
      } else if (!Utility.isEmailValid(strEmail.trim())) {
          userName.setError("Email Not Valid");
      } else if (strPassword.length() == 0) {
          password.setError(getString(R.string.password_empty));
      } else {
  
          JSONObject jsonObject = null;
          try {
              jsonObject = new JSONObject();
              jsonObject.putOpt(Constants.USER_NAME, strEmail);
              jsonObject.putOpt(Constants.USER_PASSWORD, strPassword);
              jsonObject.putOpt(Constants.DEVICE_TOKEN, "11");
              jsonObject.putOpt(Constants.MAC_ADDRESS, "111");
              jsonObject.putOpt(Constants.GPS_LATITUDE, "1111");
              jsonObject.putOpt(Constants.GPS_LONGITUDE, "11111");
          } catch (JSONException e) {
              e.printStackTrace();
          }
          final ProgressDialog pDialog = new ProgressDialog(this);
          pDialog.setMessage("Loading...");
          pDialog.show();
  
          CustomJSONObjectRequest jsonObjectRequest = new CustomJSONObjectRequest(Request.Method.POST, Constants.USER_LOGIN_URL, jsonObject, new Response.Listener&lt;JSONObject&gt;() {
              @Override
              public void onResponse(JSONObject response) {
                  pDialog.dismiss();
                  Log.e("LoginPage", "OnResponse =" + response.toString());
                  getLogin(response);
                  //LoginBean lb = new LoginBean();
                  //Toast.makeText(getApplicationContext(),lb.getFull_name()+"Login Successfuly",Toast.LENGTH_LONG).show();
                  Intent intent = new Intent(getApplicationContext(),AfterLoginActivity.class);
                  startActivity(intent);
              }
          }, new Response.ErrorListener() {
              @Override
              public void onErrorResponse(VolleyError error) {
                  Toast.makeText(getApplicationContext(),"Something, wrong please try again",Toast.LENGTH_LONG).show();
                  pDialog.dismiss();
  
              }
          });
          jsonObjectRequest.setRetryPolicy(new DefaultRetryPolicy(
                  5000,
                  DefaultRetryPolicy.DEFAULT_MAX_RETRIES,
                  DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));
          Log.e("LoginPage", "Url= " + Constants.USER_LOGIN_URL + " PostObject = " + jsonObject.toString());
          AppController.getInstance().addToRequestQueue(jsonObjectRequest);
      }
  
  }
  
  public void getLogin(JSONObject response) {
      LoginBean loginBean = new LoginBean();
      if (response != null){
          try {
              JSONObject jsonObject = response.getJSONObject("data");
              loginBean.setUser_id(jsonObject.getString("user_id"));
              loginBean.setFull_name(jsonObject.getString("full_name"));
              loginBean.setDisplay_name(jsonObject.getString("display_name"));
              loginBean.setUser_image(jsonObject.getString("user_image"));
              loginBean.setGender(jsonObject.getString("gender"));
              loginBean.setAuthorization_key(jsonObject.getString("authorization_key"));
  
          } catch (JSONException e) {
              e.printStackTrace();
          }
      }
      Toast.makeText(getApplicationContext(),"User id is "+loginBean.getUser_id(),Toast.LENGTH_LONG).show();
  }
  public void onBackPressed() {
      finish();
  }
  
  public void setupUI(View view) {
  
      //Set up touch listener for non-text box views to hide keyboard.
      if (!(view instanceof EditText)) {
  
          view.setOnTouchListener(new View.OnTouchListener() {
  
              public boolean onTouch(View v, MotionEvent event) {
                  Utility.hideSoftKeyboard(LoginActivity.this);
                  return false;
              }
  
          });
      }
  
  
  }
  </code></pre>
  
  <p>}
  `</p>
  
  <p>here is my AfterLogin class`public class AfterLoginActivity extends FragmentActivity {</p>
  
  <pre><code>private ImageView partyIcon;
  private ImageView dealIcon;
  private ImageView deliveryIcon;
  private TextView  txtParty;
  private TextView  txtDeals;
  private TextView  txtDelivery;
  boolean doubleBackToExitPressedOnce = false;
  int backButtonCount = 0;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      requestWindowFeature(Window.FEATURE_NO_TITLE);
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_after_login);
      Utility.setStatusBarColor(this, R.color.splash_status_color);
      getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
  
      partyIcon = (ImageView)findViewById(R.id.party_Icon);
      dealIcon = (ImageView)findViewById(R.id.deals_Icon);
      deliveryIcon = (ImageView)findViewById(R.id.delivery_Icon);
  
      partyIcon.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              Intent intent = new Intent(getApplication(), BookPartyActivity.class);
              startActivity(intent);
  
          }
      });
      dealIcon.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              Intent intent = new Intent(getApplication(), DealsActivity.class);
              startActivity(intent);
  
          }
      });
      deliveryIcon.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              LoginBean loginBean = new LoginBean();
              Toast.makeText(getBaseContext(),"Auth"+loginBean.getUser_id(),Toast.LENGTH_LONG).show();
              Intent intent = new Intent(getApplicationContext(),MyAuction.class);
              startActivity(intent);
          }
      });
  
  }
  /*
  public void onBackPressed()
  {
  
  
      if (doubleBackToExitPressedOnce)
      {
          Intent intent = new Intent(getApplicationContext(), MainActivity.class);
          intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
          startActivity(intent);
          finish();
      }
      doubleBackToExitPressedOnce = true;
      Toast.makeText(this, "you have logged in ,plz enjoy the party", Toast.LENGTH_LONG).show();
      new Handler().postDelayed(new Runnable()
      {
          public void run()
          {
             doubleBackToExitPressedOnce = false;
          }
      }
              , 2000L);
  }*/
  @Override
  public void onBackPressed()
  {
  
      if(backButtonCount &gt;= 1)
      {
          Intent intent = new Intent(Intent.ACTION_MAIN);
          intent.addCategory(Intent.CATEGORY_HOME);
          intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
          startActivity(intent);
      }
      else
      {
          Toast.makeText(this, "Press the back button once again to close the application.", Toast.LENGTH_SHORT).show();
          backButtonCount++;
      }
  }
  </code></pre>
  
  <p>}`</p>
  
  <p>here is LoginBean`public class LoginBean {
      private String user_id;
      private String full_name;
      private String display_name;
      private String user_image;
      private String gender;
      private String authorization_key;</p>
  
  <pre><code>public void setUser_id(String user_id) {
      this.user_id = user_id;
  }
  public String getUser_id() {
      return user_id;
  }
  
  
  public void setFull_name(String full_name) {
      this.full_name = full_name;
  }
  public String getFull_name() {
      return full_name;
  }
  
  
  public void setDisplay_name(String display_name) {
      this.display_name = display_name;
  }
  public String getDisplay_name() {
      return display_name;
  }
  
  
  public void setUser_image(String user_image) {
      this.user_image = user_image;
  }
  public String getUser_image() {
      return user_image;
  }
  
  
  public void setGender(String gender) {
      this.gender = gender;
  }
  public String getGender() {
      return gender;
  }
  
  
  public void setAuthorization_key(String authorization_key) {
      this.authorization_key = authorization_key;
  }
  public String getAuthorization_key() {
      return authorization_key;
  }
  </code></pre>
  
  <p>}`</p>