android - What does getLastKnownLocation really do? -


does give user's current location if device online? how determine last known location?

locationmanager docs

taken docs & reworded getlastknownlocation returns last known location fix obtained given provider. device not need start provider information battery life.

however, if users phone has been sleeping or turned off , has moved location out-of-date.

if need location up-to-date wouldn't use method, instead request single update, depending on applications requirements.

note: requesting location updates available provider effect users battery life if used irresponsibly


Comments

Popular posts from this blog

haskell - Using filter on an item in a list? -

c# - When does PreApplicationStartMethod actually get triggered to run? -

c# - Binding attached property to IEnumerable -