in my application, there's a Main Page and a bunch of pages to add different data. (i.e student, groups, Exercises). I have a registration page and an option to "Remember me" which leads me to the main page and I send the "Admin" there using intent. is there a way to insert and if function to know from which activity redirected the App to this activity to insert it into the if() enter image description here
admin = new Admin1();
admin.name = item.Get("Name").ToString();
admin.age = int.Parse(item.Get("Age").ToString());
admin.sport = item.Get("Sport").ToString();
admin.email = item.Get("EMail").ToString();
admin.phoneNumber = item.Get("PhoneNum").ToString();
admin.LogIn = (bool)item.Get("LogIn");
Intent intent1 = new Intent(this, typeof(MainPageActivity));
intent1.PutExtra("Admin", JsonConvert.SerializeObject(admin));
StartActivity(intent1);
admin = new Admin1(int.Parse(AgeLoginET.Text), SportLoginET.Text, NameLoginET.Text,
PhoneNumberLoginET.Text, MailLoginET.Text, keep);
HashMap map = new HashMap();
map.Put("Name", admin.name);
map.Put("EMail", admin.email);
map.Put("Age", AgeParsed);
map.Put("PhoneNum", admin.phoneNumber);
map.Put("Sport", admin.sport);
map.Put("Login", keep);
DocumentReference DocRef = database.Collection("Users").Document(admin.email);
DocRef.Set(map);
Intent intent = new Intent(this, typeof(MainPageActivity));
intent.PutExtra("Admin", JsonConvert.SerializeObject(admin));
StartActivity(intent);
//In the OnCreate()
admin1 = JsonConvert.DeserializeObject<Admin1>(Intent.GetStringExtra("Admin"));