Google Map VS GPS - android

I'm developing an Android Application, and i need to get the current location of the user. I'm wondering what is the best way to do so: using GPS or Google Maps.
Thank you for your help.

What do you think Google Maps use?
Surprise! It also uses GPS.
So getting it manually will be faster than loading a map and checking the location.
Note: you can also get your location through a network which will usually be faster (but probably less accurate).

Google Maps uses GPS and Mobile Data, so it is probably more accurate.

Try Google Play Location Services, it adds an abstraction layer to all the location stuff, so you dont need to care about what is android doing to get the location.

Related

why is the google location api is less accurate that the google maps on the phone?

the question is itching my mind .why is the google maps android app accuracy is not the same as the accuracy that you get when you develop an app that uses there API
One thing it is dependent on the kind of permission you are asking the user in the manifest.
ACCESS_COARSE_LOCATION:- approximate location.
ACCESS_FINE_LOCATION:- Precise location as possible.
Also, check the below answer:-
Android - get coordinates accurately like Google Maps

What kind of settings/method calls will get me geolocation accuracy close to Google Maps?

I've developed a hybrid app that collects GPS points using a plugin (this one, to be precise). The thing is, when users are on a remote location, with little GPS/network coverage, we've had to resort to opening Google Maps in the background and then using the app in order to get a good coordinate. Otherwise, it doesn't work too well.
I would like to eliminate the need for doing that, but feel at a loss about what kind of practices do apps like Google Maps or Waze do to get better geolocations. Is there a code base that I could study, or some documentation?
Thanks in advance!
You may check here. It is GitHub from Google Devs and they show how they handle location. Also, you can find other examples there

Are Google Play Services required to find the current gps location on an Android phone?

I've found two sources on retrieving the GPS location of an andriod phone, one from the Google Website:
http://developer.android.com/training/location/retrieve-current.html#top
and one from here:
What is the simplest and most robust way to get the user's current location on Android?
They both describe different steps. I'm not sure which one to follow, unfortunately the Android Emulator doesn't seem to come with Google Play installed, so I want to go with the second.
You can use LocationManager to getLastKnownLocation, without Play services.
No they aren't. Google services provide support for A-GPS assisted with Wifi which can get a location fix faster than just GPS or GPS+Mobile network.
Well Emulator device can get location co-ordinates but manually by ddms device manager,
And yes there are two way get location co-ordinates. One by android native and other by google play servives library. second one has its own issues. its works with proper version of google play services installed on the device. I prefer better use first one android by using simple location manager class.

Conflicting GPS location information on Android apps

I am getting gps location information and displaying it on google maps using Javascript API through WebView. I notice that the location information is not very accurate though I am using EnableHighAccuracy as true. Also I notice that the google maps app in android is able to pick up the location many times faster than my app and also able to show the location more accurately.
How is this possible? Both apps are using the available A-GPS information on android and displaying on same map.
Any thoughts on this. Also any suggestions how I can improve the accuracy.
Update: Using location information through Javascript and WebView on Android shows my current location as atleast 2-5 miles away from where I current am. However google maps app in android is able to identify the building in which I am currently sitting.
Also google maps app picks up this location with 2-5 secs, where as the webview one takes more than a minute and still gives a inaccurate location.
I think you might find that the WebView "best" location algorithm is not as sophisticated as the Google Maps algorithm. The problem you see may be related to the WebView picking the "best" location provider and getting stuck with that choice, even if another provider later becomes "best."
If it meets your requirements, you will probably have better results writing the LocationManager code yourself and sending the results to your WebView. In this way, you could monitor multiple providers and can switch between them based on which is providing the best recency/accuracy trade-off for your application.
Here's a good guide on getting started with a sophisticated location algorithm: http://developer.android.com/guide/topics/location/strategies.html

Getting the same geolocation Google Maps provides for a user?

Are there any best practices for an app to get the same geo location as the Google Maps app?
For example, my app lists nearby Sprockets based on a user's geolocation. Often the geolocation I come up with is different than what the Google Maps app comes up with (which is often more accurate).
We can kind of do this if we have a MapActivity and use MyOverlay - this should give us the same location google maps would show - but we always need to display a map to use this. I'm almost considering just hosting a hidden map on my activity in order to use MyOverlay and grab better location updates! Any more sane way of doing this?
Thanks
Android has a full location API. This is what the map system uses.
A good direction to look is the open-source Foursquare app's location code if you're looking to manage location reports from multiple providers (GPS, network, etc.) and balance freshness and so forth. IMO their solution is a bit overarchitected for most needs, but the basic ideas are pretty easy to grok from it.

Categories

Resources