The easiest way to do this would be to pass the session id to the signout activity in the Intent
you’re using to start the activity:
Intent intent = new Intent(getBaseContext(), SignoutActivity.class);
intent.putExtra("EXTRA_SESSION_ID", sessionId);
startActivity(intent);
Access that intent on next activity:
String sessionId = getIntent().getStringExtra("EXTRA_SESSION_ID");
The docs for Intents has more information (look at the section titled “Extras”).
Related Contents:
- How to manage startActivityForResult on Android
- How to send an object from one Android Activity to another using Intents?
- How to start new activity on button click
- Start Activity from Service in Android
- Android: Clear the back stack
- Android: Go back to previous activity
- Using Intent in an Android application to show another activity
- How can I return to a parent activity correctly?
- Finish an activity from another activity
- Passing arraylist of objects between activities
- How to switch activity without animation in Android?
- How to open a second activity on click of button in android app
- How to bring an activity to foreground (top of stack)?
- Pass data from Activity to Service using an Intent
- New Intent() starts new instance with Android: launchMode=”singleTop”
- How to make notification intent resume rather than making a new intent?
- Launch Skype from an App Programmatically & Pass Number – Android
- Android:Passing a hash map between Activities
- Android: Capturing the return of an activity
- Start Activity Using Custom Action
- “Failure Delivering Result ” – onActivityForResult
- Intent – if activity is running, bring it to front, else start a new one (from notification)
- Where/How to getIntent().getExtras() in an Android Fragment? [duplicate]
- Trying to UNINSTALL_SHORTCUT but shortcut won’t go away
- Android – detecting application launch from home or history
- Advantages of using Bundle instead of direct Intent putExtra() in Android
- Display Activity From Bottom to Top
- Why does FLAG_ACTIVITY_CLEAR_TOP not work?
- Kotiln: pass data from adapter to activity
- How can I save an activity state using the save instance state?
- Android Activity as a dialog
- Example: Communication between Activity and Service using Messaging
- How to return a result (startActivityForResult) from a TabHost Activity?
- Android: How to open a specific folder via Intent and show its content in a file browser?
- Detecting whether a headset is plugged into an Android device or not.
- How to capture an image and store it with the native Android Camera
- getView returning null when fragment has been created from an activity
- Pick any kind of file via an Intent in Android
- More efficient way of updating UI from Service than intents?
- Creating an Android Service with Phonegap? (Have phonegap app run even when closed)
- Intent URI to launch Gmail App
- Returning from an activity using navigateUpFromSameTask()
- How to start an Intent by passing some parameters to it?
- Clearing intent
- Espresso – How can I check if an activity is launched after performing a certain action?
- How to replace a Fragment on button click of that fragment?
- How to close activity and go back to previous activity in android
- Android, How to read QR code in my application?
- Using a broadcast intent/broadcast receiver to send messages from a service to an activity
- Data Sharing between Fragments and Activity in Android