Connect Neo4j with Android

935 views
Skip to first unread message

Jeyaganeshan Jeyatharsini

unread,
Sep 9, 2014, 2:56:52 AM9/9/14
to ne...@googlegroups.com
I need to connect neo4j database with android programming... I embed Neo4j into Java code for testing purpose and I created an interface top of that for my database access. But I am confusing with that... I am poor at connecting with application and Neo4j database... Can someone explains how it can be done with suitable explaination....

Peter Neubauer

unread,
Sep 9, 2014, 3:02:53 AM9/9/14
to Neo4j User
Hi there,
first thing - are you wanting to embed Neo4j into Android or have the
datase run as a server in the cloud and talk to it from an Android
client over the network?

For embedding Neo4j into Android, there is
https://github.com/neo4j-contrib/neo4j-mobile-android which is on an
old Neo4j version and a bit hard to build, but works.

For connecting to Neo4j as a client, you can just take Neo4j Server
(http://docs.neo4j.org/chunked/stable/rest-api.html), and talk to it
using any Java Client library (Apache Commons HTTP is built into
Android), see http://stackoverflow.com/questions/4457492/how-do-i-use-the-simple-http-client-in-android
for a sample.

HTH

/peter

G: neubauer.peter
S: peter.neubauer
P: +46 704 106975
L: http://www.linkedin.com/in/neubauer
T: @peterneubauer

Open Data - @mapillary
Open Source - @neo4j
Open Future - @coderdojo
> --
> You received this message because you are subscribed to the Google Groups
> "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to neo4j+un...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Message has been deleted

Jeyaganeshan Jeyatharsini

unread,
Sep 12, 2014, 2:30:33 AM9/12/14
to ne...@googlegroups.com
I need to use RestAPI.. They have used jersey for their example... Jersey webservices is Java supported... will it support to Android if I add jar files into class path? Or should I use Apache client?

Sukaant Chaudhary

unread,
Sep 12, 2014, 2:47:19 AM9/12/14
to ne...@googlegroups.com
Hi,
I'll suggest you to separate neo4j implementation with android.
If I'll be in your place, I'll write separate code for neo4j and create the service for android.
Then I'll consume those service using android, benefit of using this way will be, in future we can use these code for other application as well (for eg: web).

For connecting neo4j with java use cypher-jdbc, that will be faster than REST.
Check the following link for cypher-jdbc:
http://docs.neo4j.org/chunked/stable/tutorials-cypher-java.html

-Sukaant Chaudhary


--

Aru Sahni

unread,
Sep 12, 2014, 9:38:19 AM9/12/14
to ne...@googlegroups.com
For Android - REST interaction, I've had good experiences with Square's Retrofit library.

~A

Jeyaganeshan Jeyatharsini

unread,
Sep 12, 2014, 5:54:40 PM9/12/14
to ne...@googlegroups.com
How to create service for android?

Peter Neubauer

unread,
Sep 12, 2014, 11:57:37 PM9/12/14
to Neo4j User

Read the manual or ask Google , please.

/peter

(snt)-[:frm]->(phn)

Bishwajeet Kumar

unread,
May 28, 2015, 3:51:38 AM5/28/15
to ne...@googlegroups.com
Yes, it's possible. I created a blog post regarding this. Read this.
Reply all
Reply to author
Forward
0 new messages