Back to project page android-weather-demo-application.
The source code is released under:
GNU General Public License
If you think the Android project android-weather-demo-application listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package org.openweathermap.utils; // w w w . j a v a 2s. c o m import android.content.Context; import com.ink.weather.R; /** * Builds web service URLs based on the arguments provided * @author samkirton */ public class RESTProvider { /** * @return The retrieve weather REST end point */ public static String getWeatherUrl(String city,Context context) { return context.getResources().getString(R.string.rest_weather, city); } /** * @return The retrieve weather forecast REST end point */ public static String getWeatherForecastUrl(String city,Context context) { return context.getResources().getString(R.string.rest_weather_forecast, city); } /** * @return The retrieve weather conditions icon REST end point */ public static String getWeatherConditionIcon(String iconCode, Context context) { return context.getResources().getString(R.string.rest_weather_condition_icon, iconCode); } }