Solution 1 is to save the transmitted value:
Intent INT=new Intent(Activity2.this,Activity3.class); INT.putExtra("hi", getIntent().getStringExtra("hi","error"); startActivity(INT);
and again
Intent INT=new Intent(Activity3.this,Activity2.class); INT.putExtra("hi", getIntent().getStringExtra("hi","error"); startActivity(INT);
Solution 2 is to create one static variable that will store the value and will be available to all applications.
public class DataHolder { public static String hi; }
and in Activity2, instead of getting the value from the Bundle, just get it from the DataHolder:
String hi = DataHolder.hi;
These are two things that first occurred to me.
source share