You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for your efforts in humanizing the Android development! I have a question though.
I have look through your source code of BetterAsycnTask ,and confuse that how it sent the result to the new activity.If user rotates the screen, a new activity is recreated.so the context of old activity is null.
But I see that you check the context in onPreExecute and if the context is null , the request will be cancelled ,and also check it in onPost mothod.I am agree with your point that it can avoid the repeat request when user flip the screen back and forth successfully.Beacause it is still the same activity.
And you said the task keeps track of the "active" instance of the context that launched it in your blog(http://brainflush.wordpress.com/2009/11/16/introducing-droid-fu-for-android-betteractivity-betterservice-and-betterasynctask/).
So it belongs to the activity that lanched it,If the activity is destory,the context is null.and the task is unuseful.but the new activity how get the result ?
Thank you!
The text was updated successfully, but these errors were encountered:
Hello Matthias,
Thanks for your efforts in humanizing the Android development! I have a question though.
I have look through your source code of BetterAsycnTask ,and confuse that how it sent the result to the new activity.If user rotates the screen, a new activity is recreated.so the context of old activity is null.
But I see that you check the context in onPreExecute and if the context is null , the request will be cancelled ,and also check it in onPost mothod.I am agree with your point that it can avoid the repeat request when user flip the screen back and forth successfully.Beacause it is still the same activity.
And you said the task keeps track of the "active" instance of the context that launched it in your blog(http://brainflush.wordpress.com/2009/11/16/introducing-droid-fu-for-android-betteractivity-betterservice-and-betterasynctask/).
So it belongs to the activity that lanched it,If the activity is destory,the context is null.and the task is unuseful.but the new activity how get the result ?
Thank you!
The text was updated successfully, but these errors were encountered: