While I am trying to implement a simple example getting the location of the device, I found that a document which is "seemingly official": https://developer.android.com/training/location/retrieve-current#BestEstimate
The document claims that FusedLocationProviderClient
provides the following two methods: getLastLocation()
and getCurrentLocation()
. But as one can see in the example - https://developer.android.com/training/location/retrieve-current#last-known - both getLast/CurrentLocation()
lives in Java. The corresponding Kotlin example says that fusedLocationClient.getLastLocation()
"is the same as" fusedLocationClient.lastLocation
and, indeed, it works well.
I naively assume that there should be corresponding "currentLocation
" for example, fusedLocationClient.currentLocation
.
I am wondering there is no such, or I am the only one who fails to find the corresponding Kotlin method.