views:

52

answers:

2

Does someone know how to save and restore an object to a file on android ?

+1  A: 

It depends if You want to save file on internal or external media. For both situation there are great samples on Android DEV site: http://developer.android.com/guide/topics/data/data-storage.html - this should definetly help

matekm
I want to save it to internal. Im watching ObjectOutputStream now and its look interesting but dont know why, cannot get "fos = openFileOutput(filename, Context.MODE_PRIVATE);" to work, it doesnt accept my String filename parameter... what's the hell ????
Fabien
Ive found out that its a problem of context.
Fabien
A: 

See here for a code example : http://stackoverflow.com/questions/3628016/android-how-to-save-a-bitmap-buggy-code

Fabien