Issue
How do I know if an Activity A was started from Intent:
Intent intent = new Intent(this, Activity.class);
startActivity(intent);
or due to activity lifecycle (after destroy, activity A can be created again, if it is on history applications).
Is there some way to distinguish these two ways to invoke an Activity?
Solution
use PutExtras()
on the Intent
Activity
check this or that or this-indirect-post
When your Activity
is Recreated it is created with a different Intent
not the Intent
that was used to spark it initially-(especially from history), so if you use extras and check in your oncreate you will be better of -(read this with regards to the not soo much indirect post)
Answered By - Elltz
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.