title: Stop my app from sleeping (Cordova/Android)
body: <p>I have an Android App which I create from a node.js webpack project.</p>
  
  <p>When I install my app on my phone I notice that it sleeps when the phone sleeps. So for example, I have a javascript timer which stops getting called:</p>
  
  <pre><code>pingTimer=setInterval(ping,pingInterval);
  </code></pre>
  
  <p>for the pingInterval. How do I stop my app from sleeping? Eventually, I will want my app to go to sleep but for now stopping the phone from sleeping is my best option. </p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I followed the instructions as described here:</p>
  
  <p><a href="http://www.greenbot.com/article/2993199/android/how-to-turn-off-doze-mode-for-specific-apps-in-android-marshmallow.html" rel="noreferrer">http://www.greenbot.com/article/2993199/android/how-to-turn-off-doze-mode-for-specific-apps-in-android-marshmallow.html</a></p>
  
  <p>but with no luck.</p>