3

I am an android developer and have been using it for a while to develop context-aware apps. Location is one of the most important thing for context aware and accuracy of that location is very important.

I know how to get location from GPS using LocationManager... I know how to develop apps using Google maps on android... and also how to display user on the map.. etc. But my friends have found out that when they went to a foreign country for a conference, their location from LocationManager is very inaccurate compare to google maps.

They used my app (not released yet.. ) which I get my location from LocationManager and I registered for GPS and Network provider. If I plot the location that the phone gives me on a map... it's very inaccurate... some times it thinks the user is in Barcelona even though they are at a conference in USA.

Also since the conference was indoor, the GPS wouldn't have helped a lot because it would've had hard time finding a fix.

Does google maps on android get their location similar to how google tells the android developers to get the location... from LocationManager and register for onLocationChanged location listener? If it does... how come theirs is more accurate... how do they filter any outliers? or are they using any internal services to get even more accurate location which maybe google assume that if the developer get that accurate location they could misuse it?

Any ideas or comments??

chuthan20
  • 5,277
  • 1
  • 14
  • 21
  • Do you mean Google Maps App? or the website maps.google.com? if you mean the App I think they may use LocationManager but in smart way. if you mean the website I think they use HTML5 to get your location. – Hesham Saeed Jul 12 '12 at 13:03
  • I meant the google maps native app... I assume they won't allow us to see the code or algorithm they are using it to make it smarter. – chuthan20 Jul 13 '12 at 13:35
  • 1
    I don't know if this will be helpful, maybe you can open the native app and connect your mobile with eclipse logCat, maybe you can see whats happening there? and get an idea to start with. Otherwise, you have the tools, you try to use them in smart way by trial & error. – Hesham Saeed Jul 13 '12 at 13:39

1 Answers1

0

This code is written by Reto Meier, Tech Lead for Android Developer Relations, who wrote the book on Android App development. Also, that was published in Google IO conference in 2011 as I remember. This is the closest to what is used in Google Places. And it works smart anyway ;) https://code.google.com/p/android-protips-location/

Mohamed Taher Alrefaie
  • 14,080
  • 5
  • 41
  • 62