[Solved] Pass Data from Dialog to new Activity


Pass in as an extra:

instead of:

Intent i = new Intent(getActivity().getApplicationContext(),Upvalence.class);
startActivity(i);

you should pass in the name

Intent i = new Intent(getActivity().getApplicationContext(),Upvalence.class);
i.putExtra("string", SlectedName);
startActivity(i);

Then, on your Upvalence activity:

 @Override
 protected void onCreate(@Nullable Bundle savedInstanceState) {
    Bundle arguments = this.getIntent().getExtras();
    String yourString = arguments.getString("string");
 }

solved Pass Data from Dialog to new Activity