tags:

views:

75

answers:

1

The GPS on my Android phone is on, supported by the fact that :

location_manager.isProviderEnabled(LocationManager.GPS_PROVIDER)

returns true.

Yet, the following line :

 Location location = location_manager.getLastKnownLocation(LocationManager.GPS_PROVIDER) ;

returns null.

What could be the reason ?

Thanks.

+1  A: 

You should requestLocationUpdates and wait for the first one.

Nikola Smiljanić