• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Help Intents life cycle

Hi,

My query is regarding intents specifically implicit intents. When I send an intent using startActivity(intent), and the receiving application extract the needed information for it, do I still have the same intent if I call getIntent() and no other application sent intents out. For Example,

Code:
//sendingIntents
startActivity(intent)

// intital call of getIntent()
Intent i = new Intent();
firstIntent = getIntent();
varX = i.getExtra().getBoolean("test");

//Second call of getIntent();
secondIntent = getIntent();
varY = i.getExtra().getBoolean("test")

would varY have the same value as varX, or the getIntent() call in secondIntent will return null?
 
Last edited by a moderator:
varY has exactly the same value as varX, as the method getIntent() returns the same object in both cases.
 
Back
Top Bottom