How do I pass data between Activities in Android application? -
i have scenario where, after logging in through login page, there sign-out button
on each activity
.
on clicking sign-out, passing session id
of signed in user sign-out. can guide me on how keep session id
available activities
?
any alternative case
the easiest way pass session id signout activity in intent you're using start activity:
intent intent = new intent(getbasecontext(), signoutactivity.class); intent.putextra("extra_session_id", sessionid); startactivity(intent);
access intent on next activity
string s = getintent().getstringextra("extra_session_id");
the docs intents has more information (look @ section titled "extras").
Comments
Post a Comment