How do I pass data between Activities in Android application? | Android activity communication

Published by inkskull on

Checkout the How do I pass data between Activities in Android application? | Android activity communication

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”);

Categories: Android

0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Social Media Auto Publish Powered By : XYZScripts.com