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
Post a Comment