On Android 13 (API 33) geocoder.getFromLocation()
lambda is returning data in 2 different threads, first in one that is not the Main one, and the next ones in the Main thread (I get the feeling that it uses some kind of cache).
This caused me a big headache, because when I made a text change in the lambda, the app didn't crash or leave me any log, but the UI was blank in the first launch, but not in the next ones:
geocoder.getFromLocation(
latitude,
longitude,
1
) { textView.text = it[0]getAddressLine(0) }
I fixed it using the mainLooper:
Handler(getMainLooper())
.post { textView.text = it[0]getAddressLine(0) }
Since I found this, I leave it here in case anyone needs it ;)