title: Save Bundle to SharedPreferences
body: <p>I've gone to great lengths to make all of the data for my Android game fit into a savedInstanceState Bundle. There's a lot of data altogether, including many Parcelable objects. This ensures that when the app is paused or the orientation changes, no data gets lost by the Activity being recreated.</p>
  
  <p>However, I have just recently discovered that a savedInstanceState bundle is apparently NOT appropriate for long-term storage. So I'm looking for a way that I can adapt my existing save method to work as a long-term solution, so that the game state can always be restored.</p>
  
  <p>I have heard of 2 solutions so far:</p>
  
  <p><strong>1) Use the savedInstanceState bundle for orientation changes, but also incorporate SharedPrefs for when the app needs to be shut down completely.</strong></p>
  
  <p>This seems incredibly counter-productive, as it uses 2 different completely methods to do basically the same thing. Also, since my savedInstanceState Bundle uses Parcelable objects, I would have to give each of those objects another method to enable them to be written to SharedPrefs. Essentially LOTS of duplicated and difficult-to-manage code.</p>
  
  <p><strong>2) Serialize the savedInstanceState Bundle and write it directly to a file.</strong></p>
  
  <p>I am open to this, but I don't actually know how to go about doing it. However, I'm still holding onto the hope that there may be a better solution, as I've heard that serialization in Android is "comically / unusably slow".</p>
  
  <p>I would be extremely grateful if someone could provide me with a solution to this.</p>