AndroidWWO - Sample Android AppWidget for WWO API
AndroidWWO is a sample Android AppWidget for World Weather Online API. It will show weather based on your current location.
How to run
- Install AndroidWWO.apk on your android device.
- On home screen, long click to pop up context menu.
- Select AppWidget->AndroidWWO.
You should see result as this screenshot.
How to use
LocalWeather lw = new LocalWeather(true); String query = (lw.new Params(lw.key)).setQ(q).getQueryString(LocalWeather.Params.class); weather = lw.callAPI(query);
- Builder pattern for params used for construct query string
- Use XML PullParser to process XML response from API call for cheap memory footprint and fast xml processing on mobile device.