title: While retrieving values from Preference, it is repeating 20 times
body: <p>Hi I am storing BigInteger[] array into Preference, This is working fine, but while retrieving i am getting the same value 20 times, can someone tell me what's wrong with the code :</p>
  
  <pre><code>final String DELIMITER = "BOND";
  final int DELIMITER_LENGTH = 4;
  String str = null ;
  //BigInteger [] integer = new BigInteger[50];
  
  for(int l = 0; l &lt; arrayTimes.length ; l++){
  
      if(str == null){
  
          str = arrayTimes[i].toString() + DELIMITER;
      }else{
  
          str += arrayTimes[i].toString() + DELIMITER;
      }
  }
  
  savePreference("your_key", str);
  Log.d("Prefs", "Array Time Saved");
  
  String strone = loadPreference("your_key");
  ArrayList&lt;BigInteger&gt; myBigInt = new ArrayList&lt;BigInteger&gt;();
  while(strone != null){
  
      int subStringLastIndex = 0;
      if(strone.contains(DELIMITER) &amp;&amp; strone.length() != DELIMITER_LENGTH){
  
          subStringLastIndex = strone.indexOf(DELIMITER.charAt(0));
          myBigInt.add(new BigInteger(strone.substring(0, subStringLastIndex)));
          strone = strone.substring(subStringLastIndex + 4);
      }else{
  
          strone = null;
      }
  }
  
  for(int m = 0; m &lt; myBigInt.size(); m++){
  
      Log.d("Prefs", myBigInt.get(m).toString()); //Here i am printing values
  }
  </code></pre>