zh-wang / YWeatherGetter4a

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

How can we dynamically set the location for the weather. #9

Closed Shajeel-Afzal closed 10 years ago

Shajeel-Afzal commented 11 years ago

I want to know that how can we dynamically set the location for the weather. I also want to know that where i see source code of the Demo app that is available on Google Play.

Grim- commented 10 years ago

https://github.com/zh-wang/YWeatherGetter4a/blob/master/sample_app/src/zh/wang/android/yweathergetter4a/sample/

private void searchByPlaceName(String location) {
   mYahooWeather.setNeedDownloadIcons(true);
    mYahooWeather.setSearchMode(SEARCH_MODE.PLACE_NAME);
     mYahooWeather.queryYahooWeatherByPlaceName(getApplicationContext(), location, MainActivity.this);
}