connect to Neo4j through Android - impossible task?

与世无争的帅哥 提交于 2020-01-06 02:33:27

问题


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 ?


回答1:


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.



来源:https://stackoverflow.com/questions/28552810/connect-to-neo4j-through-android-impossible-task

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!