title: How to get Location if device screen is off?
body: <p>I am working on app that has to get location after some fixed interval. It is working fine. But when device' screen is off, it is not getting location.
  For this I am trying WakeLock.
  When I use PowerManager.LOCATION_MODE_NO_CHANGE, it is crashing the app without any logs.
  Please help me to use this (PowerManager.LOCATION_MODE_NO_CHANGE).
  I am using it in onCreate of MainActivity.</p>
  <pre><code>        PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);
          mWakeLock = pm.newWakeLock(PowerManager.LOCATION_MODE_NO_CHANGE, &quot;My Tag&quot;);
          mWakeLock.acquire();
  </code></pre>