1

Possible Duplicate:
Driver JDBC PostgreSQL with Android

I am creating an app which needs to connect to my server which has a postgis database which contains geo-spatial data that needs to be retrieved from and then displayed on a map on the Android app.

Currently I have a simple java program which runs on the server which uses JDBC to retrieve the data from the database.

I was wondering what the best way would be to have my app connect to this java program and request the postgis data which would then result in the java server program returning this data to the Android app.

Do you think I should use REST for this or is there a better method? Thanks

Community
  • 1
  • 1
sam
  • 2,469
  • 8
  • 37
  • 57

1 Answers1

1

I would not connect directly to the database.

REST sound like a good idea.

Maybe you could use some kind of local caching on the device, if the amount of data is not so large. With such an approach you could use the app without internet connection.