The onActivityResult is recieved before onStart

972 views
Skip to first unread message

Andreas Lillvik

unread,
Sep 16, 2010, 9:23:29 AM9/16/10
to Android Contributors
I’m working on a fix in the Browser. There is a user scenario where
one activity has a managed cursor. The activity starts another
activity with startActivityForResult. The first activity receives
onStop and the managed cursor is deactivated. When the second activity
finishes the first activity receives onActivityResult. If the activity
tries to access the managed cursor here, an exception will be thrown,
since onStart hasn't been received and the managed cursor is still
deactivated.
Is this the intended activity lifecycle behavior?

Best Regards,
Andreas Lillvik
Developer Engineer
Sony Ericsson

Dianne Hackborn

unread,
Sep 16, 2010, 10:00:24 PM9/16/10
to android...@googlegroups.com
onActivityResult should be called after onStart and before onResume.
--
Dianne Hackborn
Android framework engineer
hac...@android.com

Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails.  All such questions should be posted on public forums, where I and others can see and answer them.

Reply all
Reply to author
Forward
0 new messages