title: Android check GPS status in the Fragment
body: <p>I have tried this code but it is not working.It always return true even if gps is deactive.</p>
  
  <pre><code>private Boolean getGpsStatus() {
      if(locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER)){
          return true;
      }else{
          return false;
      }
  }
  </code></pre>