Reputation: 15146
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.
Upvotes: 1
Views: 889
Reputation: 26863
You should requestLocationUpdates and wait for the first one.
Upvotes: 3