@@ -0,0 +1,1169 @@
+package fr.tvbarthel.apps.simpleweatherforcast.openweathermap;%0A%0A%0Aimport android.content.Context;%0Aimport android.os.AsyncTask;%0Aimport android.util.Log;%0A%0Aimport java.io.IOException;%0Aimport java.net.MalformedURLException;%0A%0Aimport fr.tvbarthel.apps.simpleweatherforcast.utils.SharedPreferenceUtils;%0Aimport fr.tvbarthel.apps.simpleweatherforcast.utils.URLUtils;%0A%0Apublic class DailyForecastJsonGetter extends AsyncTask%3CVoid, Void, Void%3E %7B%0A%0A%09private Context mContext;%0A%0A%09public DailyForecastJsonGetter(Context context) %7B%0A%09%09super();%0A%09%09mContext = context;%0A%09%7D%0A%0A%09@Override%0A%09protected Void doInBackground(Void... params) %7B%0A%09%09String json = getJsonAsString();%0A%09%09if(json != null) %7B%0A%09%09%09SharedPreferenceUtils.storeWeather(mContext, json);%0A%09%09%7D%0A%09%09Log.d(%22argonne%22, json);%0A%09%09return null;%0A%09%7D%0A%0A%09private String getJsonAsString() %7B%0A%09%09String result = null;%0A%09%09try %7B%0A%09%09%09//TODO use real location.%0A%09%09%09result = URLUtils.getAsString(%22http://api.openweathermap.org/data/2.5/forecast/daily?lat=35&lon=139&cnt=14&mode=json&APPID=c756ce72a59777bd32a5762e12e74057%22);%0A%09%09%7D catch (MalformedURLException e) %7B%0A%09%09%09e.printStackTrace();%0A%09%09%7D catch (IOException e) %7B%0A%09%09%09e.printStackTrace();%0A%09%09%7D%0A%09%09return result;%0A%09%7D%0A%7D%0A

Add an async task to get the json.