lightcouch / LightCouch

CouchDB Java API
www.lightcouch.org
Apache License 2.0
67 stars 70 forks source link

How to use LightCouch on Android? #38

Closed drmencicg closed 9 years ago

drmencicg commented 9 years ago

Have someone a code that is used in Android for LightCouch? I dont know where to start with the code :S I have online couchDB database and I would like to get data from there to my app on Android...

ahmedyha commented 9 years ago

You can use LightCouch on Android, see org.lightcouch.CouchDbClientAndroid

drmencicg commented 9 years ago

OK! That worked, I dont understand how to get a view and data from it. i use this code: List list = dbClient.view("_design/login") .key("korisnickoIme") .includeDocs(true) .query(Korisnik.class);

and I get this: > GET/foi/_design/_design/_view/login?key="korisnickoIme"&include_docs=true < Status: 404 and org.lightcouch.NoDocumentException: Object Not Found.

How can i get a view in android/java, what path do I need to put in? Am I missing something?

ahmedyha commented 9 years ago

_design in the view path is incorrect, use the design document name instead.