0

I am a new developer for Android and searching about how to save custom object as persistent data. How can I save an object and restore it ?

I've researched several methods such as onSaveInstanceState and onRestoreInstanceState. But there is no method to save Vector/Object/. And I couldn't know how to save when it is on runtime.

Can you suggest me sample code ?

Thanks in advance.

Ferdinand
  • 1,193
  • 4
  • 23
  • 43

1 Answers1

1

You can do it.

Check up the Data storage section of Dev Guide doc. There provides several ways of saving data persistently. It`s easy to learn.

By the way, onSaveInstanceState and onRestoreInstanceState is not way of saving persistent data, the data is operated merely in mem.

Lyn
  • 699
  • 1
  • 7
  • 17