Qasim Sahak
public void EnterCityName (View view){

APIWeather apiWeather = new APIWeather();
EditText cityName= (EditText)findViewById(R.id.cityEditText);

try {

String apiData = apiWeather.execute("http://samples.openweathermap.org/data/2.5/weather?q="+cityName.getText().toString()+"&appid=b1b15e88fa797225412429c1c50c122a1").get();
Log.i("Weather Info", apiData);
Quote 0 0
muhammadzeeshanali
Assalam-o-alikum,

Please alter the below statement:

"http://samples.openweathermap.org/data/2.5/weather?q="+cityName.getText().toString()+"&appid=b1b15e88fa797225412429c1c50c122a1").get()
Here change appid to your generated apikey=PASTE_YOUR_KEY and in start write api instead of samples.
Quote 1 0
Qasim Sahak

Thank you so so much sir! it was really help full.

May Allah bless you will health and wealth!

Quote 0 0

Add a Website Forum to your website.

 
Urdu IT Accademy � 2013 | License Agreement