Location.reverseGeocodeAsync is giving error Geocoder is not running while app is in background

Please provide the following:

  1. SDK Version:35
  2. Platforms(Android/iOS/web/all):Android

I want to get location address Location.reverseGeocodeAsync with latitude and longitude but it gives error “Geocoder is not running”. but Location.getCurrentPositionAsync is working fine.
I have tried this code:

    var pos = {
        latitude: parseFloat(currentLatitude),
        longitude: parseFloat(currentLongitude),
    };
    var location="";
try {
    await Location.reverseGeocodeAsync(pos).then(res => {
        let addressformate = res[0].street + ", " + res[0].city + ", " + res[0].country
        location= addressformate;
    })

I called this function under TaskManager.defineTask but shows error.

Thanks in advance.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.