title: pull to refresh returns data twice
body: <p>I,m getting data from JSON feed. </p>
  
  <p>I'm able to do pull-to-refresh and it's working fine, but it's not bringing new data only, it brings all data over and over again, so every time I refresh it brings all results like same results and repeat them inside the app. </p>
  
  <p><strong>im using Volly library.</strong></p>
  
  <p>my Data JSON Looks Like</p>
  
  <p><a href="http://twaa9l.com/ji/feed.json" rel="nofollow">http://twaa9l.com/ji/feed.json</a></p>
  
  <p>here is My Code :</p>
  
  <pre><code>import java.io.UnsupportedEncodingException;
  import java.util.ArrayList;
  import java.util.HashMap;
  import java.util.List;
  
  import org.json.JSONArray;
  import org.json.JSONException;
  import org.json.JSONObject;
  
  import android.annotation.SuppressLint;
  import android.app.Activity;
  import android.content.Intent;
  import android.graphics.Color;
  import android.graphics.drawable.ColorDrawable;
  import android.os.Bundle;
  import android.support.v4.widget.SwipeRefreshLayout;
  import android.support.v4.widget.SwipeRefreshLayout.OnRefreshListener;
  import android.view.Menu;
  import android.view.MenuItem;
  import android.widget.ListView;
  
  import com.android.volley.Cache;
  import com.android.volley.Cache.Entry;
  import com.android.volley.Request.Method;
  import com.android.volley.Response;
  import com.android.volley.VolleyError;
  import com.android.volley.VolleyLog;
  import com.android.volley.toolbox.JsonObjectRequest;
  import com.twaa9l.photosee.feed.FeedItem;
  import com.twaa9l.photosee.feed.FeedListAdapter;
  import com.twaa9l.photosee.library.AppController;
  import com.twaa9l.photosee.library.SessionManagement;
  import com.twaa9l.photosee.library.UploadPhoto;
  
  public class MainActivity extends Activity {
      private static final String TAG = MainActivity.class.getSimpleName();
      private ListView listView;
      private FeedListAdapter listAdapter;
      private List&lt;FeedItem&gt; feedItems;
      protected SwipeRefreshLayout mSwipeRefreshLayout;
      private String URL_FEED = "http://twaa9l.com/ji/feed.json";
      // Session Manager Class
      SessionManagement session;
  
  
      @SuppressLint("NewApi")
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
          //refresh();
          // Session class instance
          session = new SessionManagement(getApplicationContext());
  
          /**
           * Call this function whenever you want to check user login
           * This will redirect user to LoginActivity is he is not
           * logged in
           * */
          session.checkLogin();
  
          // get user data from session
          HashMap&lt;String, String&gt; user = session.getUserDetails();
  
  
          mSwipeRefreshLayout = (SwipeRefreshLayout)findViewById(R.id.swipeRefreshLayout);
          mSwipeRefreshLayout.setOnRefreshListener(mOnRefreshListener);
          mSwipeRefreshLayout.setColorScheme(
                  R.color.swipeRefresh1,
                  R.color.swipeRefresh2,
                  R.color.swipeRefresh3,
                  R.color.swipeRefresh4);
  
          listView = (ListView) findViewById(R.id.list);
  
          feedItems = new ArrayList&lt;FeedItem&gt;();
  
          listAdapter = new FeedListAdapter(this, feedItems);
          listView.setAdapter(listAdapter);
  
          // These two lines not needed,
          // just to get the look of facebook (changing background color &amp; hiding the icon)
          getActionBar().setBackgroundDrawable(new ColorDrawable(Color.parseColor("#3b5998")));
          getActionBar().setIcon(new ColorDrawable(getResources().getColor(android.R.color.transparent)));
  
              getNewPosts();
  
      }
  
  
      private void getNewPosts() {
  
              // making fresh volley request and getting json
              JsonObjectRequest jsonReq = new JsonObjectRequest(Method.GET,
                      URL_FEED, null, new Response.Listener&lt;JSONObject&gt;() {
  
                          @Override
                          public void onResponse(JSONObject response) {
                              VolleyLog.d(TAG, "Response: " + response.toString());
                              if (response != null) {
                                  parseJsonFeed(response);
                                  if(mSwipeRefreshLayout.isRefreshing()){
                                      mSwipeRefreshLayout.setRefreshing(false);
                                  }
                              }
                          }
                      }, new Response.ErrorListener() {
  
                          @Override
                          public void onErrorResponse(VolleyError error) {
                              VolleyLog.d(TAG, "Error: " + error.getMessage());
                          }
                      });
  
              // Adding request to volley request queue
              AppController.getInstance().addToRequestQueue(jsonReq);
      }
  
      /**
       * Parsing json reponse and passing the data to feed view list adapter
       * */
      private void parseJsonFeed(JSONObject response) {
          try {
              JSONArray feedArray = response.getJSONArray("feed");
  
              for (int i = 0; i &lt; feedArray.length(); i++) {
                  JSONObject feedObj = (JSONObject) feedArray.get(i);
  
                  FeedItem item = new FeedItem();
                  item.setId(feedObj.getInt("id"));
                  item.setName(feedObj.getString("name"));
  
                  // Image might be null sometimes
                  String image = feedObj.isNull("image") ? null : feedObj
                          .getString("image");
                  item.setImge(image);
                  item.setStatus(feedObj.getString("status"));
                  item.setProfilePic(feedObj.getString("profilePic"));
                  item.setTimeStamp(feedObj.getString("timeStamp"));
  
                  // url might be null sometimes
                  String feedUrl = feedObj.isNull("url") ? null : feedObj
                          .getString("url");
                  item.setUrl(feedUrl);
  
                  int lastStoredTimeStamp = 0;
                  if(i == feedArray.length()){
                       lastStoredTimeStamp = feedObj.getInt("timeStamp");
                  }
  
                  if(feedObj.getInt("timeStamp") &gt; lastStoredTimeStamp){
                      feedItems.add(item);
                      }
              }
  
              // notify data changes to list adapater
              listAdapter.notifyDataSetChanged();
          } catch (JSONException e) {
              e.printStackTrace();
          }
      }
  
      @Override
      public boolean onCreateOptionsMenu(Menu menu) {
          getMenuInflater().inflate(R.menu.main, menu);
          return true;
      }
  
  
      @Override
      public boolean onOptionsItemSelected(MenuItem item) {
          int itemId = item.getItemId();
  
          switch (itemId) {
          case R.id.action_settings:
              session.logoutUser();
              break;
          case R.id.addPhoto:
              Intent intent1 = new Intent(this, UploadPhoto.class);
              startActivity(intent1);
              break;
          }
  
          // TODO Auto-generated method stub
          return super.onOptionsItemSelected(item);
      }
  
  
      protected OnRefreshListener mOnRefreshListener = new OnRefreshListener() {
          @Override
          public void onRefresh() {
              // TODO Auto-generated method stub
              //Toast.makeText(MainActivity.this, "We Are Refreshing", Toast.LENGTH_SHORT).show();
              getNewPosts();  
          }
      };
  
  
  }
  </code></pre>
  
  <p>What i want to do is, only bringing the new results and append them to the existing results in the app, </p>
  
  <p>NOT repeating the results.</p>
  
  <p><strong>Note :</strong> This Question is not DUPLICATED because i looked for all question the has pull to refresh problems in here and nothing worked for me </p>