getLastKnownLocation

open fun getLastKnownLocation(diffTime: Long, minAccuracy: Float)

Checks FusedLocation's last known location and checks to see if the the time the location was sampled and the accuracy of the sample is within specified limits. Otherwise, it sets up fusedlocation updates and tries to get a fresh gps sample.

Parameters

diffTime

- The maximum time, in milliseconds, that may have elapsed since the last sample.

minAccuracy

- The minimum accuracy, in meters, that is required of the last sample.