Back to project page swazam.
The source code is released under:
MIT License
If you think the Android project swazam 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 at.saws2013.szazam; //from w ww .j a v a 2 s .c o m import com.android.volley.RequestQueue; import com.android.volley.toolbox.Volley; import android.app.Application; import android.content.SharedPreferences; /** * Application class which holds some app-wide * volleyQueue instance * * @author Ren? * */ public class App extends Application { private RequestQueue volleyQueue; private SharedPreferences prefs; public final static String PREFS = "at.saws2013.szazam_preferences"; @Override public void onCreate() { super.onCreate(); volleyQueue = Volley.newRequestQueue(this); } public synchronized RequestQueue getVolleyQueue(){ return volleyQueue; } /** * Get the hostname from settings * @return Hostname which is set in the settings */ public String getHostFromSettings(){ prefs = getSharedPreferences(PREFS, MODE_MULTI_PROCESS); return prefs.getString("host", "http://localhost"); } }