views:

592

answers:

2

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 !!

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

Appreciate your kind help..

A: 

you can always use sockets or HTTP

the100rabh
A: 

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): http://stackoverflow.com/questions/2352679/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.

Mondain