deathsonic18
Newbie
I am using the openweather api to receive weather information, at the moment I managed to get the current weather information by using the geo coordinates such as :
Town Name,Current Date,Current Weather,Current Humidity,Current Temp
Would anyone know how I will be able to get the forecast of the current day, night temp and auto refresh?
example:
later on today it will be rainy or sunny or snowy etc
night temp will be 18 degrees
the data will refresh every 30m
I have been trying to figure this out for days now
do you have any ideas? i'll be glad to hear them
any responses will be greatly appreciated
Town Name,Current Date,Current Weather,Current Humidity,Current Temp
Would anyone know how I will be able to get the forecast of the current day, night temp and auto refresh?
example:
later on today it will be rainy or sunny or snowy etc
night temp will be 18 degrees
the data will refresh every 30m
I have been trying to figure this out for days now
do you have any ideas? i'll be glad to hear them
any responses will be greatly appreciated

Code:
TextView cityField, detailsField, currentTemperatureField, humidity_field, pressure_field, weatherIcon, updatedField;
Typeface weatherFont;
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.weather);
weatherFont = Typeface.createFromAsset(getApplicationContext().getAssets(), "fonts/weathericons-regular-webfont.ttf");
cityField = (TextView)findViewById(R.id.city_field);
updatedField = (TextView)findViewById(R.id.updated_field);
detailsField = (TextView)findViewById(R.id.details_field);
currentTemperatureField = (TextView)findViewById(R.id.current_temperature_field);
humidity_field = (TextView)findViewById(R.id.humidity_field);
weatherIcon = (TextView)findViewById(R.id.weather_icon);
weatherIcon.setTypeface(weatherFont);
Function.placeIdTask asyncTask =new Function.placeIdTask(new Function.AsyncResponse() {
public void processFinish(String weather_city, String weather_description, String weather_temperature, String weather_humidity, String weather_pressure, String weather_updatedOn, String weather_iconText, String sun_rise) {
cityField.setText(weather_city);
updatedField.setText(weather_updatedOn);
detailsField.setText(weather_description);
currentTemperatureField.setText(weather_temperature);
humidity_field.setText("Humidity: "+weather_humidity);
weatherIcon.setText(Html.fromHtml(weather_iconText));
}
});
asyncTask.execute("35.9495", "14.4084"); // asyncTask.execute("Latitude", "Longitude")
openWeatherDialog.OpenWeather(context);
}

