GPS Locater not working
<p>Im trying to get the current user location via GPS. I've read the google documents on this and have tried a few tutorials but nothing seems to work properly. Here is my code:</p>

<pre><code>public class useGPS extends Activity implements LocationListener
{
private static final String TAG = "useGPS:";
LocationManager myLocManager;
TextView locationData;

@Override
protected void onCreate(Bundle savedInstanceState) 
{
    super.onCreate( savedInstanceState );
    setContentView( R.layout.use_gps );

    myLocManager = ( LocationManager )this.getSystemService( LOCATION_SERVICE );
    Location location = myLocManager.getLastKnownLocation( myLocManager.GPS_PROVIDER) ;
    if( location != null )
    {
        Log.d( TAG,location.toString() );
        Toast.makeText( this, "Location changed...", Toast.LENGTH_SHORT);
        this.onLocationChanged( location );
    }
}

@Override
protected void onResume() 
{
    super.onResume();
    myLocManager.requestLocationUpdates( myLocManager.GPS_PROVIDER, 3000, 0, this );

}

@Override
protected void onPause()
{
    super.onPause();
    myLocManager.removeUpdates( this );
}


@Override
public void onLocationChanged(Location location) 
{
    Log.d( TAG,"onLocationChanged with location: "+location.toString() );

    // Return a string representation of the latitude &amp; longitude. Pass it to the textview and update the text
    String text = "Lat: "+location.getLatitude()+"\nLong: "+location.getLongitude();

    locationData = (TextView)findViewById( R.id.locationData );
    locationData.setText( text );
}

@Override
public void onProviderDisabled(String provider) {
    Toast.makeText( getApplicationContext(), "Provider Disabled...", Toast.LENGTH_SHORT );

}

@Override
public void onProviderEnabled(String provider) 
    {
    Toast.makeText( getApplicationContext(), "Provider Enabled...", Toast.LENGTH_SHORT );

}

@Override
public void onStatusChanged(String provider, int status, Bundle extras) {
    // TODO Auto-generated method stub

}
</code></pre>

<p>I'm aware that GPS tends to not work indoors so I went and stood outside for 5minutes and it didn't make a difference. When I used the emulator to simulate a location it returned the lat &amp; long of the location fine - no errors. </p>

<p>Also - I have included the necessary permissions in the manifest file as follows:</p>

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

<p>Any idea's as to why this isn't working?</p>
