title: How to listen to changes made to location services React Native with Expo?
body: <p>I am building an app using React Native with Expo and from the documentation provided here: <a href="https://docs.expo.io/versions/latest/sdk/location.html" rel="nofollow noreferrer">https://docs.expo.io/versions/latest/sdk/location.html</a></p>
  
  <p>I used the code sample in the documentation and I am supposed to get location permission access prompt and when granted the location services should be automatically enabled on the device to get the current location.</p>
  
  <p>On my Android S6 edge test device I only get the prompt and when I press allow I get a warning that location services are not enabled.</p>
  
  <p>So is there a way to programatically enable location services ?</p>
  
  <p>Here is my code:</p>
  
  <pre><code>constructor(props) {
    super(props);
    this.state = {
      location: false,
    };
  }
  
  componentDidMount() {
    this.askForUserPermissionToGetCurrentLocation();
  }
  
  async askForUserPermissionToGetCurrentLocation() {
    // Ask for user's permission to access location settings
    let { status } = await 
    Expo.Permissions.askAsync(Expo.Permissions.LOCATION);
    console.log(status);
    // User denied access
    if (status !== "granted") {
      console.log("denied");
  
    // Otherwise, access granted
    } else {
      console.log("permission granted");
      // Get the location
      let location = await Expo.Location.getCurrentPositionAsync({});
      console.log(location);
      this.setState({ location: location });
  }
  </code></pre>
  
  <p>}</p>
  
  <p>Render method is just a text to display the longitude and latitude of the returned location.</p>