how to directly pass value of a variable from 1st activity to 3rd activity using putextra?
For example:
I have a variable A in the first screen (first activity)
You can pass any value between any two Activities you want. You just need to do two things:
In your FirstActivity:
Intent intent = new Intent(context, ThirdActivity.class);
i.putExtra("value_key", value); //valus is a String
startActivity(intent);
In your ThirdActivity's onCreate()
:
Bundle b = getIntent().getExtras();
String value = (String) b.getString("value_key");