Form Activity Login I call
Intent intent=new Intent(LogIn.this,BRInfoActivity.class);
From Activity BrActivityList I Call
Intent intent=new Intent(BRActiviList.this, BRInfoActivity.class);
intent.putExtra("BRinfo", objBR);
And Now in BRInfoActivityList
Intent i = getIntent();
BrInfoEN objBR=(BrInfoEN)i.getSerializableExtra("BRinfo");
Now i want if(intent==BrActivityList)The last two above line execute otherwise does not.How to do it?
Form Activity Login call this--
From Activity BrActivityList Call--
Now, when you get the intent, compare the "call_from" string in an if-else block! That's it!
If you will start activity with
startActivityForResult()
. Then you can usegetCallingActivity()
to get caller.May this help you...
The new intent comes as part of
onNewIntent(Intent)
. The original Intent is still available viagetIntent()
.You put whatever code you need to into
onNewIntent
in order to update the UI with the new parameters; probably similar to what you're doing inonCreate
.Also, you probably want to call
setIntent(intent)
inonNewIntent
to make sure future calls togetIntent()
within the Activity lifecycle get the most recent Intent data.