title: SharedPreference or Map<String, SoftReference<Bitmap>>
body: <p>I have more than 10 images to be dynamically fetched from server when my app launches (mostly just the 1st time the app launches).</p>
  
  <p>What is the best practice for doing this and why?</p>
  
  <ol>
  <li><p>Maintain a  <code>Map&lt;String, SoftReference&lt;Bitmap&gt;&gt;</code> where I will have a hashmap where the elements are SoftReference.</p></li>
  <li><p>Saving <code>byte[]</code> using </p></li>
  </ol>
  
  <p></p>
  
  <pre><code>String encodedImage = Base64.encodeToString(imgData, Base64.DEFAULT);
  SharedPreferences shre = PreferenceManager.getDefaultSharedPreferences(this);
  Editor edit=shre.edit();
  edit.putString("image_data",encodedImage);
  edit.commit();
  </code></pre>
  
  <p>Can someone illustrate the advantage of each?</p>