title: How to keep React Native apps running when user minimum the app or screen off or open another app?
body: <p>I am develop like running track app using react native</p>
  <p>Here is my code</p>
  <pre><code>export default class App extends React.Component {  
      constructor(){  
          super();  
          this.state = {  
              where: {lat:null, lng:null},  
          }  
      }  
      checklocation(){        
          navigator.geolocation.getCurrentPosition(this.geoSuccess);  
      }  
   
      geoSuccess = (position) =&gt; {  
          this.setState({  
              ready:true,  
              where: {lat: position.coords.latitude,lng:position.coords.longitude }  
          })  
      } 
      start_timer(){
       setInterval(() =&gt; {
        this.checklocation();
       }, 1000);
      }
      render() { 
          return (  
              &lt;View style={styles.container}&gt;  
                     &lt;Button onPress={this.start_timer()} title=&quot;Start Tracking&quot; /&gt;
                      &lt;Text style={styles.big}&gt;  
                          Latitude: {'\n'}{this.state.where.lat}   
                          {'\n'}{'\n'}
                          Longitude: {'\n'}{this.state.where.lng}  
                      &lt;/Text&gt;  
   
              &lt;/View&gt;  
          );  
      }  
  } 
  </code></pre>
  <p>But When the user minimum the app or screen off or open another app?
  The apps is not running.</p>
  <p>I have tried to add</p>
  <pre><code>&lt;uses-permission android:name=&quot;android.permission.WAKE_LOCK&quot; /&gt;
  </code></pre>
  <p>to AndroidManifest.xml</p>
  <p>but still not work, any idea how to keep React Native apps running when users minimum the app or screen off or open another app?</p>