Android Async Task State
I am using Async Task in fragment for doing some background operations. I
am able to handle the state of Async task in fragments by using i.e.,
during orientation changes.
The problem is, I want to save the status of Async task(whether it is
PENDING OR FINISHED) when i call an activity from fragment. Because when i
come back from activity to fragment the async task is not being retained.
Note:
setRetainInstance(true) works during orientation changes,
onSaveInstanceState(Bundle bundle) wont work if setRetainInstance(true) is
written. onSaveIntanceState(Bundle bundle) works when another fragment or
activity is called.
No comments:
Post a Comment