开发者

Restore running Async Task in Activity

开发者 https://www.devze.com 2023-02-09 13:51 出处:网络
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'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.

0

精彩评论

暂无评论...
验证码 换一张
取 消