Search code examples
androidkotlingeocodingdeprecation-warningandroid-tiramisu

Geocoder - getFromLocation() deprecated


I've received a message that this function (or it's constructor) has been deprecated. There's a new constructor of that function that accepts an additional parameter 'Geocoder.GeocodeListener listener' but that new constructor requires an API Level 33 and above. What should I do for the lower API levels, what's the solution?

enter image description here


Solution

  • Since this is deprecated in API level 33, I believe this is the only option for lower API levels.