07/07/2022, 7:11 AM
Cannot figure out how to store value that I get from location services and call the api using those values Inside my Fragment File Here I am try to call locationProvider to get the latitude and longitude. And once i get those i want to call api to get the weather data weatherApi. I cannot initialise variables inside locationProvider.lastLocation.addOnSuccessListener also i cannot call weatherApi inside the locationProvider.lastLocation.addOnSuccessListener as it suspend function. I tried many different approaches but nothing seems to work. Right now i am using global variable to store the value of...