Issue
I see very odd sequence of events when compared to Android lifecycle overview. My app calls other activity (file selector) and waits for the result. Such events happen:
- my app calls StartActivityForResult (file selector shows up)
- OnStop is called
- OnActivityResult is called
- OnStart is called
The last two events looks like mixed order to me, because technically my app works (code inside OnActivityResult) while being stopped. It even sounds weird :-).
Did I do something wrong? Is there a way to configure my app/activity for "correct" order -- i.e. first being woke up and then get OnActivityResult?
Gingerbread 2.3 if this matters.
Solution
The order is correct.When OnStop
is called,you will on the second activiy.At this time,OnActivityResult
is not called,it was a callback when you do something like SetResult
and finish the second activity,then the first activity will handle OnStart
method.
Answered By - Leo Zhu - MSFT
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.