share variable between two activities
ActivityA:
// intent.PutStringArrayListExtra("This is a string", str);
var activity2 = new Intent (this, typeof(Activity2));activity2.PutExtra ("MyData", "Data from Activity1");StartActivity (activity2);
ActivityB:
string text = Intent.GetStringExtra ("MyData") ?? "Data not available";
ActivityA:
// intent.PutStringArrayListExtra("This is a string", str);
var activity2 = new Intent (this, typeof(Activity2));activity2.PutExtra ("MyData", "Data from Activity1");StartActivity (activity2);
ActivityB:
string text = Intent.GetStringExtra ("MyData") ?? "Data not available";