AndroidWWO is a sample Android AppWidget for World Weather Online API. It will show weather based on your current location.
- 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.
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.