Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use LightCouch on Android? #38

Closed
drmencicg opened this issue Apr 1, 2015 · 3 comments
Closed

How to use LightCouch on Android? #38

drmencicg opened this issue Apr 1, 2015 · 3 comments

Comments

@drmencicg
Copy link

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
Copy link
Collaborator

ahmedyha commented Apr 2, 2015

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

@drmencicg
Copy link
Author

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
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants