Getting the Android GpsLocationProvider object
<p>I want to get to the class GpsLocationProvider on Android. I want to call a few methods of this class, like setMinTime(). 
Here is my code:</p>

<pre><code>LocationManager lm = (LocationManager) getSystemService(LOCATION_SERVICE);
GpsLocationProvider pr = (GpsLocationProvider)lm.getProvider(LocationManager.GPS_PROVIDER);
</code></pre>

<p>And the problem is GpsLocationProvider  class is unresolved. I know that it is located in <code>com.android.internal.location.GpsLocationProvider</code> , but such import is unresolved as well, and <code>import com.android.internal.*;</code> doesn't help to resolve GpsLocationProvider too. 
What does this mean? 
Thank you for any tips.</p>

<p>EDIT: I know that I can change most of the LocationProvider pararmeters through LocationManager like <code>LocationManager.requestLocationUpdates(String provider, long minTime, float minDistance, LocationListener listener)</code> , but what I'm trying to do is a little hack. I want another programm to update gps coords more often than it does. That's why I cant use LocationManager (that requires listener parameter), and want to set "global" gps params, that will affect another activity.</p>

<p>EDIT2: I tried with reflections as suggested by Reno.</p>

<pre><code>LocationProvider provider = lm.getProvider(LocationManager.GPS_PROVIDER);       
 try {
    Class classGpsProvider = Class.forName("com.android.internal.location.GpsLocationProvider");
        classGpsProvider.cast(provider);
    ...
</code></pre>

<p>But unfortunately the call to lm.getProvider() returns DummyLocationProvider, and that one acts like a shadow for GpsLocationProvider. </p>
