I wish to perform Wifi scanning at regular interval between 0-10sec as the time can be set by user. However, i am not sure whether to use AsyncTask or Handler to do so or even combining both to achieved the task. And also, while the timer is running, user might change the time and so the program would have to change 开发者_C百科accordingly.
The TimerTask already runs on it's own thread, so you don't need to use an AsyncTask just put the code you want to run in the TimerTask.run() method.
All The Best
精彩评论