Home > OS >  I can't know how this line convert from java to kotlin
I can't know how this line convert from java to kotlin

Time:12-06

i canont know how this line convert from java to kotlin the code of nearby places for android

Task<Location> task=fusedLocationProviderClient.getLastLocation()

i make application to get nearby places convert code java to kotlin but this line cannot convert it

CodePudding user response:

You can convert this line to Kotlin just like this. Before you call make sure the location permission.

val task: Task<Location> = fusedLocationProviderClient.lastLocation
  • Related