Dodi
Dodi

Reputation: 2269

connect to Neo4j through Android - impossible task?

Is there any way I can connect to a remote Neo4j server from an Android Project at all ? I have used several approaches: JDBC driver and through REST API using Jersey Client however none of these approaches are successful. All of these work in a pure Java project but fail miserably in Android. At this stage I lost hope that there exists a way I can talk to the database through android. Is that feasible or am I wasting my time trying to find impossible solution ?

Upvotes: 1

Views: 275

Answers (1)

Jeffrey Blattman
Jeffrey Blattman

Reputation: 22637

If Neo4j exposes an HTTP REST interface, then yes of course you can access it from Android. There are many different ways, including HTTPUrlConnection and Apache HttpClient.

If you want to use Jersey, there's no reason why that wouldn't work. I'd start with one of the above first though to prove to yourself that the basics work.

Here someone as written a Java binding to the REST API.

https://github.com/neo4j-contrib/java-rest-binding

You can use (most) Java libraries in Android.

Upvotes: 1

Related Questions