<How to save my location in a global variable> I a...
# stackoverflow
u
How to save my location in a global variable I am getting my GPS data via: fusedLocationClient.lastLocation .addOnSuccessListener { location: Location? -> location2 = location var latitude = location?.latitude var longitude = location?.longitude println(latitude) println(longitude) println("gps?") StopsFromWebservice().execute() } which works. But I want to use the location in a different method....