title: Android - How to save an array of int/bool, check if it exists, and load it back after restarting app
body: <p>Previously I've asked some questions regarding what method I should use to save some data from my app to retrieve at a later time after it's been closed/stopped.  I got the answers I was looking for, I think.  But since then, my efforts to implement such a feature has fallen way short.  I've researched various questions I've had, for which I thought I found answers.  But it seems that the answers, while maybe correct, are not a match necessarily for each other.  What I mean, is they might work separately, but coming from various sources, they don't work together as a whole, and for me they don't work at all.  I'm led to believe I want to use SharedPreferences.  That may or may not be the case, but that has been the direction of my efforts lately.</p>
  
  <p>So I'll ask this multi-part question.</p>
  
  <ol>
  <li>How would you go about saving an array of integers(or boolean values)?</li>
  <li>Before loading that saved array, how would I check if it exists?</li>
  <li>How would I load the array to use its values again?</li>
  </ol>
  
  <p>Those are the basis of my issues right now.  Even at this point, as frustrated as I may be, I don't mind doing more research if someone can point me in the right direction, but everywhere I've looked seems to be missing information and I'm unable to really understand/see how to code what I want to do.</p>
  
  <p>If you REALLY want to see some code, I can show you all my broken pieces at the moment (what I haven't deleted), but I don't see it doing you any good.  That said, I'll answer any questions you may need to help me out.</p>
  
  <p>Thanks in advance.</p>
  
  <p>EDIT:  The array will change very little from app version to version.  It should be about 500-2000 integers or boolean values (either/or will work the same for me). The array is basically a set of flags that tells the app to do one thing or another depending on the value.  The size will only change if I add or remove items between versions.  For this reason, after checking if the file/array exists, I'll compare the saved array with one in the app and act accordingly.</p>