How to save an int to a file and then read it back in android -


i creating app , i'm still new programming. looking around long time find out, how save int file , read later, found nothing. here's snippet:

int money = 750; save.setonclicklistener(new view.onclicklistener() {     @override     public void onclick(view v) {         // todo auto-generated method stub     } }); 

so when button pushed, int should saved file called money.txt.

you can use shared preferences if value used in app.

explanation , example: http://developer.android.com/guide/topics/data/data-storage.html#pref


Comments

Popular posts from this blog

java - How to specify maven bin in eclipse maven plugin? -

single sign on - Logging into Plone site with credentials passed through HTTP -

php - Why does AJAX not process login form? -