Geolocation - Want to get current location of user in android activity

De openkb
Aller à : Navigation, rechercher

Sommaire

Questions

I need current location of user in my application on based on that location I will search on database!

I am getting current location right now by using example code given but it is not accurate. If no GPS I get location by network provider but it shows sometime 2 location names at the same location. If it is showing one name 1 min before after 2 min it will change to another location.

This code is look but do not know how to use it. Please help me out in this regard!

http://stackoverflow.com/questions/3145089/what-is-the-simplest-and-most-robust-way-to-get-the-users-current-location-in-an http://stackoverflow.com/questions/3145089/what-is-the-simplest-and-most-robust-way-to-get-the-users-current-location-in-an

I need to get the location name.

Answers

Network location is not as reliable as GPS location, so you might get some fluctuation. That s even more true if you re relying on wifi APs.

You may try to average locations or wait to see if it stabilises in some location in particular, or show the most common location (i.e., the one reported most of the time).

Source

License : cc by-sa 3.0

http://stackoverflow.com/questions/6005560/want-to-get-current-location-of-user-in-android-activity

Related

Outils personnels
Espaces de noms

Variantes
Actions
Navigation
Outils