I'm looking for a complete example of an activity which uses async task and implements a way to refer to a running async task after the activity is paused (onPause). I searched the web for an example which I could use but didn't find a complete one, onl开发者_StackOverflow中文版y code fragments.
I'm using async task to ping servers in my app, but a way to save a reference to running async tasks is missing so after onPause, the running tasks get lost.
thanks in advance :-)
See this Commonsware blog post. He has an example of an asynctask working across orientation changes.
精彩评论