Android Open Source - load-image-on-wall-of-vk Account






From Project

Back to project page load-image-on-wall-of-vk.

License

The source code is released under:

GNU General Public License

If you think the Android project load-image-on-wall-of-vk listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.kb2fty7.exampleapp_loadimageforwallofvk_1;
//from  w  w w . j  a  v  a 2 s.c o  m
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);
    }
}




Java Source Code List

com.kb2fty7.exampleapp_loadimageforwallofvk_1.Account.java
com.kb2fty7.exampleapp_loadimageforwallofvk_1.LoginActivity.java
com.kb2fty7.exampleapp_loadimageforwallofvk_1.StartActivity.java