title: Android Gps issue
body: <p>The following code works on some devices but it does not work other devices. If I check the gps setting the gps is on and provides a mock location. My manifest file also as the following permissions:</p>
  
  <pre><code>// Getting LocationManager object
      locationManager = (LocationManager)getSystemService(Context.LOCATION_SERVICE);        
  
      // Creating an empty criteria object
      Criteria criteria = new Criteria();
  
      // Getting the name of the provider that meets the criteria
      provider = locationManager.getBestProvider(criteria, false);
  
      if(provider!=null &amp;&amp; !provider.equals("")){
  
          // Get the location from the given provider 
          Location location = locationManager.getLastKnownLocation(provider);
  
          locationManager.requestLocationUpdates(provider, 20000, 1, this);
  
  
          if(location!=null)
              onLocationChanged(location);
          else
              Toast.makeText(getBaseContext(), "Location can't be retrieved", Toast.LENGTH_SHORT).show();
  
      }else{
          Toast.makeText(getBaseContext(), "No Provider Found", Toast.LENGTH_SHORT).show();
      }
  </code></pre>