Android location manager compilation error
<p>I'm trying to retrieve an instance of a LocationManager class (do get some GPS related information). I have used wrote a simple class to do so, but it end up giving me an error </p>

<pre><code>Cannot make a static reference to the non-static method getSystemService(String) from the type Context
</code></pre>

<p>here's my class</p>

<pre><code>public class LocationManagerHelper {

    static Location location = null;

    public static Location getLocation () {
        LocationManager manager = (LocationManager) Context.getSystemService(Context.LOCATION_SERVICE);

        if(manager.isProviderEnabled(LocationManager.GPS_PROVIDER)) {
            Location location = manager.getLastKnownLocation(LocationManager.GPS_PROVIDER);
        } else {
            System.out.println("Provider is disabled");
        }
        return location;
    }
}
</code></pre>

<p>Thanks.</p>
