1

I'm in the process of starting a new Android project that will:

  • Display a Google map
  • Track and record users movements
  • Display the route on the map
  • Show local points on interest on the map

My question is what extra tools will I need to accomplish this? I can already get a basic Google Map working with zoom controls and place overlays etc. but my main concern is how I will track the users movements. I was thinking there maybe some sort of fleet management API but I really have no idea.

A link to some sort of tutorial would be great or even just to possible tools.

Trott
  • 66,479
  • 23
  • 173
  • 212
Peter
  • 549
  • 7
  • 20

4 Answers4

2

Use the class http://developer.android.com/reference/android/location/LocationManager.html to obtain the device geographical location

Toni Toni Chopper
  • 1,833
  • 2
  • 20
  • 29
1

You don't need any extra tools. Use the GPS or radio cells to get the location of the phone. This thread explains how you can get the location: How do I get the current GPS location programmatically in Android?

Community
  • 1
  • 1
Kaj
  • 10,862
  • 2
  • 33
  • 27
1

If you want to Track the users movement you'll need to run a webservice on a server and have the app report the location of a user at regular intervals.

Be careful though, if you don't tell the user this is what you are doing, and provide an opt out, you could be pulled from the market pretty quickly.

Be sure you aren't recording any sensitive information as well. Usually position, phone type and OS type is allowed but much more could get you in trouble.

Michael Allen
  • 5,712
  • 3
  • 38
  • 63
  • He can store the information in the phone, he doesn't need to store anything on servers. – Kaj Jun 08 '11 at 14:34
  • Yeah, thats the other option, but he said he wanted to track and record movement so I assumed it was from a developer standpoint wanting to track his users. – Michael Allen Jun 08 '11 at 14:36
  • It rather sounds like he wants to develop an application that users can use in order to track where they have been, and then display that information in a map. (Like a travel mapper) – Kaj Jun 08 '11 at 14:40
  • @Kaj Yes, that it exactly the kind of thing I want to develop :) – Peter Jun 09 '11 at 13:52
1

A Caltrans planning grant went towards creating an Android app called CycleTracks that does all of your bulleted items except the last one about points of interest.

You can download the source code here: http://www.sfcta.org/downloads/cycletracks/CycleTracks-android.zip

I haven't looked at the license to see how free you are to use it as a starting point, but I have to imagine it might be helpful just to be able to look at it even if the license is restrictive.

You can read more about it at http://www.sfcta.org/content/view/666/375.

Trott
  • 66,479
  • 23
  • 173
  • 212