why my gps is not triggered?
<p>i have a problem with my app getting my GPS position. </p>

<p>first of all i have the two things in my manifest:</p>

<pre><code>&lt;uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /&gt;
&lt;uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /&gt;
</code></pre>

<p>then i have a code like this for the location:</p>

<pre><code>LocationManager locationManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE);
LocationListener locationListener = new LocationListener() {
    public void onLocationChanged(Location location) {
      // Called when a new location is found by the network location provider.
      makeUseOfNewLocation(location);
    }
    public void onStatusChanged(String provider, int status, Bundle extras) {}
    public void onProviderEnabled(String provider) {}
    public void onProviderDisabled(String provider) {}
  };
locationManager.requestLocationUpdates(0l, 0f, new Criteria(), locationListener, Looper.getMainLooper());
</code></pre>

<p>now the strange thing:</p>

<p>when i have wifi enabled and i'm in my network, i get a position. If i have only GPS enabled i dont get my position. even i dont see the gps icon at the top of the phone which shows when a app makes use of my gps.</p>

<p>what is wrong here?</p>
