What I thought is that if there is a login page, you log in and there is a logout button for each activity. So, when I press logout, I want to pass the logged out or logged in session ID to another activity, what should I do? Or is there any other solution other than delivering session ID?
android android-intent
I think it would be easiest to deliver the session ID. I think we can deliver the logout activity to the intent.
Intent intent = new Intent(getBaseContext(), SignoutActivity.class);
intent.putExtra("EXTRA_SESSION_ID", sessionId);
startActivity(intent)
Like this. And receiving the intents delivered is
Bundle extras = getIntent().getExtras();
if (extras != null) {
String value = extras.getString("EXTRA_SESSION_ID");
}
This is how you do it
© 2024 OneMinuteCode. All rights reserved.