client = RestApplication.getRestClient(this); // fetch data client.getHomeTimeline(1, new JsonHttpResponseHandler() { @Override public void onSuccess(int statusCode, Header[] headers, JSONArray response) { for (int i = 0; i < response.length(); i++) { try { // translate data into java objects JSONObject jsonObjectTweet = response.getJSONObject(i); Tweet tweet = Tweet.fromJson(jsonObjectTweet); // add new objects to data source tweets.add(tweet); // notify adapter data has been updated adapter.notifyDataSetChanged(); } catch (JSONException e) { e.printStackTrace(); } } } @Override public void onFailure(int statusCode, Header[] headers, String responseString, Throwable throwable) { // the network request failed for some reason. debug here } }); }