Question to ANDROID developers only:
I'm looking for help with understanding of AccountManager
class (http://developer.android.com/reference/android/accounts/AccountManager.html).
In docs there is a note: Requests which may block, including getResult()
, must never be called on the application's main event thread.
Some of these requests require Activity
to start another intent
if needed.
I guess in getResult()
a new inte开发者_开发技巧nt
could be started as sub-activity to the activity
passed to the request, but this code is executed on background thread and activity passed to request could be already destroyed due to different reasons.
When I use getResult()
on background thread, how can I be sure that Activity
is not destroyed (e.g. due to screen rotation)?
精彩评论