Android device, Location service

getLocationAsync = async () => {
    const { status } = await Permissions.askAsync(Permissions.LOCATION);

    if (status !== 'granted') {
      alert('You must allow location services to use this feature.');
      return false;
    }

    const enabled = await Location.hasServicesEnabledAsync();
    if (enabled === false) {
      alert('You must enable location services to use this feature');
      return false;
    }

    const location = await Location.getCurrentPositionAsync({
      enableHighAccuracy: true,
    });

    const latLong = {
      latitude: location.coords.latitude,
      longitude: location.coords.longitude,
    };

    const address = await Location.reverseGeocodeAsync(latLong);

    console.log({ location, address });

    this.handleStateChange(address);
  };

So… using the above code the address object doesnt contain any city data - it comes back null. Does anyone know why this happens on android only? according to the docs here
Location docs

I should get back a string

enableHighAccuracy: false,

Try and check the Street :
alert(address[0].street)

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