In my activity there are several params which are used for showing user infomation such as user scores. However, the score is got from webserver and changed every 5 minutes. So i make a invisible refresh button and performClick it every 5 minutes to fetch data from webserver. I use asynctask to do http work. But how to initiate activity when it is first shown? As the activity is onresumed, it is post forground, and theasynctask thread is not completed,so no user information available.Ijust want to fetch data before activity started or oncreated.