机器人发送位置信息通过GPS的servlet [英] android send location details to servlet via gps

查看:145
本文介绍了机器人发送位置信息通过GPS的servlet的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新手,Android..i在我program..i经度和纬度的细节要通过向它们发送到Web服务器gps..and这些细节应该被保存在数据库和检索他们时,我需要.. PLZ解释我如何do..and如果可能的话给我一些样品code ...

i am newbie to Android..i have latitude and longitude details in my program..i want to send them to web server via gps..and those details should be saved in a database and retrieve them whenever i require..plz explain me how to do..and if possible give me some sample code...

推荐答案

您不能送,通过GPS的东西。 GPS是一种只接收的事情。

You can't "send" something "via GPS". GPS is a "receive-only" thing.

http://en.wikipedia.org/wiki/Global_Positioning_System

如果你想将数据发送到Web服务器,您可以使用HTTP协议与Android,例如检索经度和纬度(<一个href=\"http://stackoverflow.com/questions/2227292/how-to-get-latitude-and-longitude-of-the-mobiledevice-in-android\">How获得使用mobileDevice的经度和纬度的Andr​​oid ),然后使用HTTPGET(或HttpPost):

If you like to send data to a web server, you can use the HTTP-protocol with Android, e.g. retrieve latitude and longitude (How to get Latitude and Longitude of the mobiledevice in android?) and then use HttpGet (or HttpPost):

http://developer.android.com/reference/org/apache/http/client/methods/HttpGet.html

这篇关于机器人发送位置信息通过GPS的servlet的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆