How to send GPS data from android to a website?

烈酒焚心 提交于 2019-12-04 17:51:36
Paul Gregoire

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.

Have a look at this question for some example code to get started (for lat/long): Passing GPS LonLat from Android GPS to WebPage (javascript)

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/

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!