Hi,

Subtract the Location.getTime() value from the current time to get the
age of the last fix.

See http://code.google.com/android/reference/android/location/Location.html

Regards

On Jan 23, 10:07 am, Anna PS <[email protected]> wrote:
> Hi
>
> When you get GPS location using getLastKnownLocation, is there a way
> to check how old the data is, i.e. when the location was last
> updated?
>
> I'm noticing that sometimes my app is giving me an out-of-date
> location (usually because the sky is not visible when the app starts)
> - it'd be good to warn the user about this.
>
> It's possible to check the age of the data on the iPhone I believe, is
> it possible in Android?
>
> thanks!
> Anna
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to