Getting a Value from the inside of a Coroutine outside of the Coroutine in Kotlin?
I'm pretty new with kotlin programming and have to complete a tourguide project. I have a hopefully simple problem, but I'm too stupid to fix it I guess.
In the following code segment I want to use the val "loc" (that's coming from the inside of a coroutine / addOnSuccessListener) as the "startlocation" that is currently set on "LatLng(49.7913, 9.9534)" outside the coroutine. But how do I get that value outside to the main thread? Sadly I can't just do "val startlocation = loc" :(