In an app Im working on Im using a backoff pattern of different location listeners and this works just fine but in the case that the location isnt available Im allowing the app to default to the lastknownlocation and sometimes the app will only use this and not update its location. How can I check the time when the lastKnownLocation was updated
Share
You should simply call getTime() on whatever location you get, for instance on the location you get from
LocationManager.getLastKnownLocation(). Then calculating the age of that data is trivial.