Back to project page Sunshine.
The source code is released under:
Apache License
If you think the Android project Sunshine 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 br.com.santhyago.udacity.sunshine.app; /* w ww . ja v a 2 s .co m*/ import android.content.Context; import android.content.SharedPreferences; import android.preference.PreferenceManager; /** * Created by san on 11/23/14. */ public class Utility { public static String getPreferredLocation(Context context) { SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); return prefs.getString(context.getString(R.string.pref_location_key), context.getString(R.string.pref_location_default)); } }