Back to project page StravaFlow.
The source code is released under:
MIT License
If you think the Android project StravaFlow 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 me.mattlogan.stravaflow.util; /*ww w.j a va 2 s .com*/ import android.content.Context; public class PreferencesUtils { private static final String STRAVA_STATS_PREFERENCES = "STRAVA_STATS_PREFERENCES"; private static final String KEY_ACCESS_TOKEN = "KEY_ACCESS_TOKEN"; public static void saveAccessToken(Context context, String accessToken) { context.getSharedPreferences(STRAVA_STATS_PREFERENCES, 0) .edit() .putString(KEY_ACCESS_TOKEN, accessToken) .commit(); } public static String retrieveAccessToken(Context context) { return context.getSharedPreferences(STRAVA_STATS_PREFERENCES, 0) .getString(KEY_ACCESS_TOKEN, null); } }