Newer
Older
CosmosClient / app / src / main / java / com / example / cosmosclient / entities / CachePref.java
package com.example.cosmosclient.entities;

import android.content.SharedPreferences;

import com.google.gson.Gson;

public class CachePref {
    private final static String RPEF_NAME = "cache";
    private SharedPreferences pref;
    private SharedPreferences.Editor editor;

    public static final String KEY_AREA_INFO = "AreaInfo";

    public String get(String key, String defaultValue) {
        return pref.getString(key, defaultValue);
    }
    public void put(String key, String value) {
        editor.putString(key, value).commit();
    }
}