[Android] AsyncTask (異步任務) 看全部

似乎Android 3.0以後,呼叫Web Service都會出現android.os.NetworkOnMainThreadException,必需使用asynctask來解決。

Android web service access using Async Task
http://codeoncloud.blogspot.tw/2 ... ss-using-async.html (已測試,確定可用)

To find more details about Async Task follow the links below
http://developer.android.com/reference/android/os/AsyncTask.html
http://www.vogella.com/articles/ ... essing/article.html

其他參考網址:
http://imax-live.blogspot.tw/2013/03/asynctask.html
http://lionlionchopper.pixnet.ne ... r%E5%92%8Casynctask
http://stackoverflow.com/questio ... d/18297516#18297516