diff --git a/app/src/main/java/org/ntlab/amaryllis/client/Amaryllis.java b/app/src/main/java/org/ntlab/amaryllis/client/Amaryllis.java index 0566fbd..92081c7 100644 --- a/app/src/main/java/org/ntlab/amaryllis/client/Amaryllis.java +++ b/app/src/main/java/org/ntlab/amaryllis/client/Amaryllis.java @@ -9,6 +9,7 @@ private String uid = null; private String password=null; private String name = null; + private String new_introduction = null; private Location location; public void setUid(String uid) { @@ -56,12 +57,28 @@ return name; } + public void setIntroduction(String new_introduction) { + SharedPreferences prefData = getSharedPreferences("pref_data", MODE_PRIVATE); + SharedPreferences.Editor editor = prefData.edit(); + editor.putString("new_introduction", new_introduction); + editor.commit(); + } + + public String getIntroduction() { + if(new_introduction == null){ + SharedPreferences prefData = getSharedPreferences("pref_data", MODE_PRIVATE); + new_introduction = prefData.getString("new_introduction", ""); + } + return new_introduction; + } + public void setToken(String token) { SharedPreferences prefData = getSharedPreferences("pref_data", MODE_PRIVATE); SharedPreferences.Editor editor = prefData.edit(); editor.putString("token", token); editor.commit(); } + public String getToken() { if(token == null){ SharedPreferences prefData = getSharedPreferences("pref_data", MODE_PRIVATE);