Best unofficial Apache Server developers community
Username
Forgot password?
Sign in with Twitter account
Sign in with Facebook account

Android send location details to servlet via gps

0

135 views

hi..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...

asked February 24, 2011 8:23 am CST
posted via StackOverflow

3 Answers

0
 

You're really asking for a lot, but lets see if we can point you in the right directions.

Here is a great example of reading GPS data from an Android device: LocationManager example

You must declare explicitly in Android that your app needs permission to access the Internet (and the GPS, for that matter). Android Securty and Permissions

There are also some specific ways of life in Android development. The official developer's guide is a good place to start. The Android Developer's Guide

answered February 24, 2011 10:39 am CST
1
 

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

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

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

answered February 24, 2011 10:39 am CST
1
 

Did you mean the mobile network or wireless instead of GPS ?

Anyway:

You from the sounds of it you need to get the GPS details into your program then pass them to your server. Have you designed your webserver yet or are you going to be submitting this to a site that already exists?

answered February 24, 2011 10:39 am CST

Your answer

Join with account you already have


Sign in with Twitter account
Sign in with Facebook account
Sign in with Google Friend Connect

Preview
Similar questions
MongoDB Query Details
January 19, 2011
Remote Debug GWT Servlet
January 18, 2011