I am currently creating an Android app on Kotlin, but I want to use the FusedLocationProviderClient to get GPS information at regular distance intervals, but I can't get it well.
It's natural that it's not accurate because of the desired value, but even if you specify 10m, it can be more than 50m.
Is the setting wrong?
I would appreciate it if you could point it out.
private funcreateLocationRequest():LocationRequest?{
return LocationRequest.create()?apply{
setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY)
setSmartDisplacement (10F)
// setFastestInterval (100000)
// setInterval (5000)
}
}
This method is
Set the minimum replacement between location updates in meters
You set the minimum instead of the maximum, so
10m is over 50m
is completely up to specification and there is no problem.
© 2024 OneMinuteCode. All rights reserved.