如何从Android的发送GPS数据到网站? [英] How to send GPS data from android to a website?

查看:117
本文介绍了如何从Android的发送GPS数据到网站?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

喜 我是新来的Andr​​oid和Web服务的发展! 我目前在开发Android程序,将发送经纬度信息,asp.net网站正在处理(显示位置更改网站图) 问题是 - 如何这个数据发送到网站(最好的做法)! - 一个合适的框架,从Android应用程序本身出发,插入到数据库,客户端/服务器连接!!任何建议

Hi I'm new to Android and web service development! currently I'm working in developing Android program that will send longitude and latitude information to asp.net website (to show the location change the website map) the questions are - how to send this data to the website (the best practice)! - any suggestions for a suitable framework starting from the android application itself , inserting to database , client/server connection !!

我读过很多关于Web服务的专门REST ..但没找到教程

I've read a lot about web services specially REST ..but didn't find tutorials

鸭preciate你的帮助。

Appreciate your kind help..

推荐答案

我会建议你使用JSON来恩code你的数据,这将让你在使用任何实现(pretty的多)服务器接受它。我preFER的Java / Servlet的,但你可以肯定找一个JSON库ASP.net等使用的东西标准之类的JSON允许你从长远来看不是做一些定制的灵活性。

I would suggest that you use JSON to encode your data and this will allow you to use any implementation (pretty much) on a server to receive it. I prefer Java/Servlets but you can most certainly find a JSON library for ASP.net etc. Using something "standard" like JSON allows you more flexibility in the long run than doing something custom.

有一看看这个问题,对于一些例如code上手(为纬度/长):<一href="http://stackoverflow.com/questions/2352679/passing-gps-lonlat-from-android-gps-to-webpage-javascript">http://stackoverflow.com/questions/2352679/passing-gps-lonlat-from-android-gps-to-webpage-javascript

Have a look at this question for some example code to get started (for lat/long): http://stackoverflow.com/questions/2352679/passing-gps-lonlat-from-android-gps-to-webpage-javascript

我也建议你使用HTTP时使用POST而非GET,有一些例子安卓code在这里:的 http://www.anddev.org/doing_http_post_with_android-t492.html 和的 http://www.androidsnippets.org/snippets/36/

I also suggest that you use POST instead of GET when using HTTP, there is some example Android code here: http://www.anddev.org/doing_http_post_with_android-t492.html and http://www.androidsnippets.org/snippets/36/

最后,如果你需要的安全性和使用的是HTTP,只需添加一个SSL证书到你的服务器,然后你将有HTTPS。

Lastly if you need security and you are using HTTP, simply add an SSL certificate to your server and you will then have HTTPS.

这篇关于如何从Android的发送GPS数据到网站?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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