Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android

GET all documents of a couchdb into an android listview

Hello treehouse community,

With this lines of code I'm saving some data of input fields into my couchdb database:

public static HttpResponse makeRequest(String uri, String json) {
    try {
        HttpPost httpPost = new HttpPost(uri);
        httpPost.setEntity(new StringEntity(json));
        httpPost.setHeader("Accept", "application/json");
        httpPost.setHeader("Content-type", "application/json");
        return new DefaultHttpClient().execute(httpPost);
    } catch (UnsupportedEncodingException e) {
        e.printStackTrace();
    } catch (ClientProtocolException e) {
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
    }
    return null;
}

Now I want to display all the stored documents in a ListView.I really can't find a way to GET all documents in form of JSON objects or something like that without the need of some external library like Ektrop or lightcouch.

Is there a easy way to solve my problem? When you know a step by step tutorial or could give me a helpful hint I would be very thankful.

Otherwise which library would help me by getting the data out of the couchdb and is friendly for a newbie like me on this topic?

Thanks in advance.