开发者

android connectivity with php-mysql using web services

hey guys i am developing a final year location-based project(gps) in android.I have to create a server using php and mysql which contains name and location(in latitude and longitude) of important hospitals in Mumbai.The android client should be able to retrieve the the latitude and longitude of locations in mysql(external) database and then plot it on a google map.

pp开发者_如何学编程l have suugested me to use default http client to communicate with server(apache web services)...Could u plzz tell me whether this is possible?If yes, then can someone plzz suggest me some good tutorials (basics)for learning client server communication using apache (http client and http server) on the web...and also if possible its implementation in android(so that i can use it in my final project to connect to my php-mysql server ) ....in order to make it more efficient... Any help would be appreciated....cheers


If you want to keep it simple my suggestion is the following:

  • setup HTTP server, use PHP to connect to MySQL db
  • implement web interface in PHP, either webService or JSON (I'd suggest JSON as it's simpler and sufficient for your purpose
  • implement simple http client in android using REST requests to the server
  • parse JSON response using something like the Jackson java JSON library
  • remember to implement user authentication (e.g. simple username/password using POST over HTTPS)

You can easily find examples for all these steps everywhere.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜