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

Popular posts from this blog

unicode - Are email addresses allowed to contain non-alphanumeric characters? -

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -