7

I should make an app to take a picture and geotag it. I see 2 ways to do it:

  1. Using an intent for the android camera default, take the picture (meanwhile looking for GPS location), and then edit EXIF header;
  2. Build a camera application through the camera API, then geotag it with setGpsLatitude() etc.

I'd like to know which is the best choice, or generally when is better using first or the second way.

xlm
  • 6,854
  • 14
  • 53
  • 55
KitKat
  • 715
  • 2
  • 7
  • 10

2 Answers2

5

I would use an intent to the camera and then geo tag it. Check out this documentation for the gps side of things. http://developer.android.com/guide/topics/location/obtaining-user-location.html

Just as an FYI if you want the gps to be super accurate it is not a pleasure to work with. Especially if the user is in a basement somewhere.

From my knowledge there are two main routes for gps. Fine gps and network. Network uses triangulation of service towers to tie down a gps corrd. Not super accurate but it works. Fine works but can take up to 15 seconds if the user is in a bad spot.

You also could use the google maps api and allow the user to enter in an address of where the photo was taken and convert that address to a lat and lng. https://developers.google.com/maps/documentation/geocoding/

Cheers,

Jake

JakeWilson801
  • 1,036
  • 7
  • 20
  • Thank you for the reply. Using intent was my first choice (can use all camera features without re-implementing them in a customized version, which is not needed for the moment). Considering the pic will be (probably) sent over Internet, I was thinking using both GPS-PROVIDER and NETWORK-PROVIDER, starting them before launching intent (so that it can catch location meanwhile user takes the pic). Is it a good/bad idea? App will be used on open area, so there shouldn't be big problems on obtaining location – KitKat Mar 27 '12 at 23:19
  • Yeah I would do anything I could to save time capturing there location. So yes that is a good idea. – JakeWilson801 Mar 28 '12 at 00:04