Please provide the following:
- SDK Version:35
- 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.