Back to project page Android-VKontakte-SDK.
The source code is released under:
MIT License
If you think the Android project Android-VKontakte-SDK 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 com.perm.kate.api.sample; /* w w w . j a va2 s.c om*/ import android.content.Context; import android.content.SharedPreferences; import android.content.SharedPreferences.Editor; import android.preference.PreferenceManager; public class Account { public String access_token; public long user_id; public void save(Context context){ SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); Editor editor=prefs.edit(); editor.putString("access_token", access_token); editor.putLong("user_id", user_id); editor.commit(); } public void restore(Context context){ SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); access_token=prefs.getString("access_token", null); user_id=prefs.getLong("user_id", 0); } }