Beruflich Dokumente
Kultur Dokumente
up
Referring to the question and answer on Best way to store a single user in an Android app?
vote do How does shared preferences actually work?
wn vote
What I'd like to do is:
favorite
Madiha
1
Hello, three of us have tried to help below, would you be able to upvote the useful answers and tick one if it answers
your question. If it doesn't, could you clarify why so we can help further? Thanks! Neil Townsend Mar 14 at 18:46
2 Answers
activeoldestvotes
up
You can do this with shared preferences, as long as you are comfortable storing reasonably
vote d confidential data there. You will need some shared codes between storing and retrieving:
own
vote final static String pfName = "com.super.stuff.preffile.name";
final static String pfCodeForID = "com.super.stuff.pf.id";
final static String pfCodeForPassword = "com.super.stuff.pf.passwd";
final static String pfNoStringPresent = "NO-STRING-PRESENT-HERE";
Neil Townsend
2,2462524
up
vote dow
n vote public SQLiteDatabase sampleDB;