i have a listview in which i have some list of data i am sending it to other activity on click
i am sending data with intent
Intent i = new Intent(MainActivity.this,AppDiscription.class);
i.putExtra("NAME", s);
i.putExtra("AMT", Appname);
i.putExtra("COUNT", cnvert);
i.putExtra("SELECTEDID", selectedFromList);
startActivity(i);
on receiving activity:
if (extras != null) {
Appname = extras.getString("NAME");
total = extras.getString("AMT");
count = extras.getString("COUNT");
selected = extras.getString("SELECTEDID");
}
now i have to save "selected" into a variable on this activity so that i can compare it with new "selected" data which will came with next intent when i will click on listview.