开发者

How to send a location on android app to server?

My project is create application on android. It can get a location(latitude,longitude) via GP开发者_运维问答S.After that I want to send a location to a server or web server to collect for calculate a distance which are draw on my own map(may be make from Flash) on a website. I knows an android have apache, but I don't really know in detail about server, web server, apache.So, I want to know how to send a location from my application to server. Anyone can help me or suggest me?

Appreciate, Daisy

PS. I'm a newbie.


If you're writing both the Android part of the application and the server part, then you can decide how to transmit the data. You could go with some simple JSON like:

{"lat":12.34,"lng":56.78}

No reason to come up with anything more complicated than that if you don't have to.


I don't think its necessary to have apache server on server side,

AFAIK> android can ping to any web service on any web server. I can ping an asp web service that can be hosted on IIS.< AFAIK

You can ask the developer of that site to develop web service (api url) that can accept latitude and longitude as parameter (or search the api if they have one (a la google maps case)) and you only have to care about calling that web service.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜