I have the same problem with this. FusedLocationProviderClient getLastLocation elapsedRealtimeNanos mostly current system time
My code currently compares the time value of location by FLP getLastLocation()
with the current time value and requests a new location if 5 seconds have passed.
At some point, however, the value(current time - last location time) continues to be zero seconds. I don't know how to solve it.
The steps for requesting location are as follows:
Request
FusedLocationProviderClient.getLastLocation()
Determine if
lastLocation
was acquired within 5 seconds of the current time- Use location information within 5 seconds, end of the process
Request a new location update if 5 seconds have been elapsed (Request both Location manager and FLP)
Remove all location update requests if new locations have been updated via Location manager or FLP
age = time diff : (SystemClock.elapsedRealtimeNanos() - getElapsedRealtimeNanos() of passed location) / 1000000000L
@marilion91 If the timestamp value is still up to date, I wonder if you have confirmed that the user is likely to be in the same location.
Please advise.