android - Service does not give the correct Location -


i have service running in implement "location listener", create locationmanager this:

lm = (locationmanager) getsystemservice(context.location_service); lm.requestlocationupdates(locationmanager.gps_provider,1000*2,0, this); 

and try make string on onlocationchanged(location location) this:

route = string.valueof(location.getlatitude()) + "," + string.valueof(location.getlongitude()); 

the problem unless wait lot of time listener won't location updates, because gps_provider takes time ready.

i have permissions in manifest feature, , ask gps enabled before starting service.

is there option making app wait until gps ready?

i want app wait until gps ready give locations, tell user he/she must wait until moment start.


Comments

Popular posts from this blog

scala - 'wrong top statement declaration' when using slick in IntelliJ -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

PySide and Qt Properties: Connecting signals from Python to QML -