Can I check devices location is open or close on React Native
<p>Can I check devices location is open or close before using <code>geolocation</code>?
I want to show alert message like <code>App need to run your location, please open your devices location</code>, when devices location is close.</p>

<p>Can I navigate to go native location setting both IOS and Android?</p>

<p>Like example -</p>

<pre class="lang-js prettyprint-override"><code>componentDidMount() {
  // Check condition device location is open or close.
  if( DevicesLocation === 'close' ) {
     alert('App need to run your location, please open your devices location');
     // other process 
  } else {
     navigator.geolocation.getCurrentPosition(
        (position) =&gt; {
           var initialPosition = JSON.stringify(position);
           this.setState({ initialPosition});
        },
        (error) =&gt; console.log(error.message)
     );
  }
}
</code></pre>