final String APIVersion = localContext.getResources().getString(R.string.api_version);
final String urlAPI = localContext.getResources().getString(R.string.uri_api_weather_today);
final String url = weatherService.createURIAPICurrent(urlAPI, APIVersion, latitude, longitude);
- final String urlWithoutCache = url.concat("&time=" + System.currentTimeMillis());
- final String jsonData = HTTPClient.retrieveDataAsString(new URL(urlWithoutCache));
+ final String jsonData = HTTPClient.retrieveDataAsString(new URL(url));
return weatherService.retrieveCurrentFromJPOS(jsonData);
}
final String APIVersion = localContext.getResources().getString(R.string.api_version);
final String urlAPI = localContext.getResources().getString(R.string.uri_api_weather_forecast);
final String url = weatherService.createURIAPIForecast(urlAPI, APIVersion, latitude, longitude, localContext.getString(R.string.weather_preferences_day_forecast_fourteen_day));
- final String urlWithoutCache = url.concat("&time=" + System.currentTimeMillis());
- final String jsonData = HTTPClient.retrieveDataAsString(new URL(urlWithoutCache));
+ final String jsonData = HTTPClient.retrieveDataAsString(new URL(url));
return weatherService.retrieveForecastFromJPOS(jsonData);
}
final String urlAPI = this.getResources().getString(R.string.uri_api_weather_today);
final String url = weatherService.createURIAPICurrent(urlAPI, APIVersion,
weatherLocation.getLatitude(), weatherLocation.getLongitude());
- final String urlWithoutCache = url.concat("&time=" + System.currentTimeMillis());
- final String jsonData = HTTPClient.retrieveDataAsString(new URL(urlWithoutCache));
+ final String jsonData = HTTPClient.retrieveDataAsString(new URL(url));
return weatherService.retrieveCurrentFromJPOS(jsonData);
}
final String urlAPI = this.getResources().getString(R.string.uri_api_weather_today);
final String url = weatherService.createURIAPICurrent(urlAPI, APIVersion,
weatherLocation.getLatitude(), weatherLocation.getLongitude());
- final String urlWithoutCache = url.concat("&time=" + System.currentTimeMillis());
- final String jsonData = HTTPClient.retrieveDataAsString(new URL(urlWithoutCache));
+ final String jsonData = HTTPClient.retrieveDataAsString(new URL(url));
return weatherService.retrieveCurrentFromJPOS(jsonData);
}