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; /*from ww w.jav a 2 s. c o m*/ import org.openweathermap.sql.SQLInitProvider; import android.app.Application; import com.android.volley.RequestQueue; import com.android.volley.toolbox.Volley; import com.app.sqlite.SQLProvider; /** * The global application state as a singleton * @author samkirton */ public class WeatherApplication extends Application { private static WeatherApplication mInstance; private RequestQueue mRequestQueue; private SQLProvider mSQLProvider; public static WeatherApplication getInstance() { return mInstance; } public RequestQueue getRequestQueue() { return mRequestQueue; } public SQLProvider getSQLProvider() { return mSQLProvider; } @Override public final void onCreate() { super.onCreate(); mInstance = this; SQLInitProvider sqlInitProvider = new SQLInitProvider(getBaseContext()); mSQLProvider = new SQLProvider(sqlInitProvider.getWritableDatabase()); mRequestQueue = Volley.newRequestQueue(getApplicationContext()); } }