zh-wang / YWeatherGetter4a

An Yahoo Weather API wrapper for android
99 stars 45 forks source link

About AsyncTask #2

Closed vamdonald closed 10 years ago

vamdonald commented 11 years ago

Recently I ran your code and it threw exception NetworkOnMainThreadException. Finally I found out it's because of the http request in the UI thread. I solved this by implement the AsyncTask class. Maybe it is better to add that in the source code in WOEIDUtils.java and YahooWeatherUtils.java.

zh-wang commented 11 years ago

Thank you, vamdonald. I'll update my code recently.