开发者

How to access external mysql database in android? Which library for http requests?

I already am planning to use php to access the actual database then post the data so that the android app can then proceed to grab it. I am using the database to store longitude and latitude of 开发者_如何学JAVAgeopoints for a location based application. I have my map drawing and class for drawing overlays I am just not sure where to start from here.

I want to use http requests to call a php file that will grab geopoints from the mysql database.


You could use AndroidHttpClient if you want and also the Apache DefaultHttpClient.

You'll just have to make a RestService in php that will give you the data you need. You will execute HttpGet or HttpPost and you can return data in XML or JSON. Then you can parse it in Android using XMLPullParser or JSON.

Good luck.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜