5

I have a Bundle with a nested nature that I want to preserve, how can I persist the whole Bundle most easily? SharedPreferences lacks a bundle feature.

inazaruk
  • 74,247
  • 24
  • 188
  • 156
hunterp
  • 15,716
  • 18
  • 63
  • 115

1 Answers1

4

Don't use a Bundle. A Bundle is not meant to be persisted. Use a different data model (POJOs, HashMap, whatever) and write persistence logic (serialize, serialize to JSON, serialize to XML, write to SQLite, etc.).

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491