title: Other thread to read and write sharedPreferences
body: <p>I really have to use another thread to read and write a <code>sharedPreferences</code> file?</p>
  
  <p>I'm storing an <code>integer array</code> in <code>sharedPreferences</code> file, I convert it in string to store there, ok, this array corresponds to the itens of a gridView, then I have to read it on <code>onCreate()</code> and write it on <code>onDestroy()</code>, the problem is I'm calling an <code>asyncTask</code> on onCreate() and this is causing a lot of problems... the main one is that the onCreate() is been called many times (every time that other activity came in front mine, it is destroyed and restarted...), I found out in here that a kind bug occurs when other thead is called on onCreate(), then I had to save some things on <code>onSaveInstanceState()</code>, but this only resolved my problem in part. I already tested do not use other thread and read and write the file directly on UI thread, and this worked nicely, but I always heard I have to use other thread to any kind of <code>I/O</code>... then I'm in doubt... </p>
  
  <p>After all, I can or I can't read and write a sharedPreferences file without call other thread?</p>
  
  <p>Thx</p>