Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I can't get searchCity list #43

Open
GLodi opened this issue Dec 21, 2015 · 9 comments
Open

I can't get searchCity list #43

GLodi opened this issue Dec 21, 2015 · 9 comments

Comments

@GLodi
Copy link

GLodi commented Dec 21, 2015

Not sure if I set it right, but I understand from the documentation (http://survivingwithandroid.github.io/WeatherLib/android_weatherlib_search_city.html) that I'm supposed to set as pattern the city name's string. It doesn't work for me though. The method onCityListRetrieved doesn't seem to be called when I pass the name of a city, and the cityList (where I'm supposed to get the IDs) is not even created. Can anyone link me an example?

@GLodi
Copy link
Author

GLodi commented Dec 22, 2015

Update: onWeatherError in searchCity returns "JSONException: no value for list". How do I fix it?

@survivingwithandroid
Copy link
Owner

i will check,,,

@raffaeu
Copy link

raffaeu commented Jan 5, 2016

I have the same exact problem using both Yahoo provider and OpenWeatherMap provider. The list is returned with empty. Is there any specific regex that we should pass?

@sarinsukumar
Copy link

I am also facing the same issue, any solutions ?

@raffaeu
Copy link

raffaeu commented Apr 18, 2016

No, at the moment the only way for me is to use the open weather provider, the others do not work, I think the APIs are not up to date with the project.

@sarinsukumar
Copy link

Which provider are you using now ? I cant see open weather provider.

@raffaeu
Copy link

raffaeu commented Apr 18, 2016

@surinsukumar I use this one and it works but you need to register and create your own key

if(config == null){ config = new WeatherConfig(); config.maxResult = 10; config.numDays = 1; config.ApiKey = "your key goes here"; config.unitSystem = WeatherConfig.UNIT_SYSTEM.M; }

WeatherClient client = builder.attach(context) .provider(new OpenweathermapProviderType()) .httpClient(com.survivingwithandroid.weather.lib.client.okhttp.WeatherDefaultClient.class) .config(config) .build();

@sarinsukumar
Copy link

Thank you raffaeu, Openweather map is working isnt it ?

@sarinsukumar
Copy link

Thank you @raffaeu it is working perfect for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants