title: how to enable network and gps location from within my app?
body: <p>I'm trying to get the location of the user:</p>
  <p>// getting GPS status</p>
  <pre><code>isGPSEnabled = locationManage.isProviderEnabled(LocationManager.GPS_PROVIDER);
  
          // getting network status
          isNetworkEnabled = locationManager
                  .isProviderEnabled(LocationManager.NETWORK_PROVIDER);
  
          if (!isGPSEnabled &amp;&amp; !isNetworkEnabled) {
              // no network provider is enabled
              Log.e(MyLogger.TAG, &quot;Non providers are enabled&quot;);
  </code></pre>
  <p>I need the user to set <code>enable network location</code> or <code>turn on GPS</code>.</p>
  <p>How can i help the user do each of these options?</p>
  <blockquote>
  <ol>
  <li><p>open the device settings page and return to my activity on back press.</p>
  </li>
  <li><p>change these two device settings from within my application only?</p>
  </li>
  </ol>
  </blockquote>
  <p>meaning opening a confirmation dialog that will enable these two settings.</p>