How to return a variable inside a addOnSuccessListener? [duplicate]
I'm using Google Places API and I want to return a Place Object out of my func but it is executed asynchronously.
That's my code:
Code with asynchronous func▾
Here you can see the logs:
As you can see the variable don't get the returned values. So my question is: How can I return "response.place" out of the func?