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, only 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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.